...
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
...
First value: {{projectStyle}}
Condition: does not equals
Second value: next-gen
...
“6. Get the Projectrak JWT”
“7. Store the JWT in a variable“
8. 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
...
Add component → New Action → Create variable
Variable name: projectrakYesTeamManagedIdprojectrakNoTeamManagedId
Smart value: {{#webResponse.body.values}}{{id}}{{/}}
...
10. 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!