Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

First of all, it's necessary to create a Single select field, we have called “Team Managed project“ and reate Managed“ with just one option called “Yes“No”.

...

Then, get the field id of the field from the Projectrak field manager. In this example, the field id is: 253710

...

  • Web request URL: https://<your_instance>.atlassian.net/rest/api/3/project/{{project.id}}

  • Headers:

    • Content-Type: application/json

    • Authorization: Basic <Jira base64 authentication string>

  • HTTP method: GET

  • Web request body: Empty

  • Check: Delay execution of subsequent rule actions until we've received a response for this web request

...

65. Rule step: create a variable to store the project style

...

  • Variable name: projectStyle

  • Smart value:  {{webResponse.body.style}}

...

76. Rule step: create condition for “next-gen” projects

...

  • First value: {{projectStyle}}

  • Condition: does not equals

  • Second value: next-gen

...

87. Get the Projectrak authorization token and store it in a variable

...

  • “6. Get the Projectrak JWT”

  • “7. Store the JWT in a variable“

48. Rule step: get the “Yes” “No” value id, from the Projectrak “Team managed project” field

...

  • Web request URL: https://profields-cloud.deiser.com/items/fields/<select_field_id>?query=YesNo

  • Headers:

    • Content-Type: application/json

    • Authorization: Bearer {{projectrakJwt}}

  • HTTP method: GET

  • Web request body: Empty

  • Check: Delay execution of subsequent rule actions until we've received a response for this web request

...

59. Rule step: store the Status id in a variable

Add component → New Action → Create variable

  • Variable name: projectrakYesTeamManagedIdprojectrakNoTeamManagedId

  • Smart value:  {{#webResponse.body.values}}{{id}}{{/}}

...

1510. Rule step: update project “Team managed project” field to “Yes”“No”

Add component → New action → Send a web request

...

  • Web request URL: https://profields-cloud.deiser.com/values/projects/{{project.id}}/fields/<select_field_id>

  • Headers:

    • Content-Type: application/json

    • Authorization: Bearer {{projectrakJwt}}  

  • HTTP method: POST

  • Web request body: Custom data

  • Custom data: {{projectrakYesTeamManagedIdprojectrakNoTeamManagedId}} is the item ID of status field from Projectrak

Code Block
{
 "value": {{projectrakYesTeamManagedIdprojectrakNoTeamManagedId}}
}

...

And that’s all folks!