Action - βοΈ Overwrite a Jira custom field with a Projectrak field value
Required
To perform this use case, you need to have technical knowledge. If you need any kind of help, you can contact us throughΒ help@deiser.com
- 1.1 Rule 1:Β Whenever a work item is created, if a Projectrak field value is populated, a Jira custom field in that work item should also be populated.Β
- 1.1.1 00. Previous steps
- 1.1.2 01. Create an automation rule
- 1.1.2.1 Step 1.Β Β Configure trigger
- 1.1.2.2 Step 2.Β Get value from the Project field "Country (project)"
- 1.1.2.3 Step 4. Get the authorization token
- 1.1.2.4 Step 5. Get value from the Project field "Country (project)"
- 1.1.2.5 Step 6.Β Compare work item value with project value
- 1.1.2.6 Step 7.Β Update the work item with the Projetrak value
- 1.1 Rule 1:Β Whenever a work item is created, if a Projectrak field value is populated, a Jira custom field in that work item should also be populated.Β
- 2 Rule 2:Β Update work items with Projectrak valueΒ every day
- 2.1 Step 1. Schedule an execution
- 2.2 Step 2.Β Check Country (work item) field is not emptyΒ
- 2.3 Step 3. Get the authorization token
- 2.4 Step 4. Get value from the Project field "Country (project)"
- 2.5 Step 5. Compare work item value with project value
- 2.6 Step 6. Update the work item with the Projetrak value
Β
Rule 1:Β Whenever a work item is created, if a Projectrak field value is populated, a Jira custom field in that work item should also be populated.Β
00. Previous steps
1. Create a single selection list field called "Country (project)" in Projectrak.Β (Please, keep in mind that the field "Country (project)" is only an example)
2. Create a single selection list field called "Country (work item)" in Jira.Β (Please, keep in mind that the field "Country (work item)" is only an example)
Β
01. Create an automation rule
Step 1.Β Β Configure trigger
Create a new trigger βΒ Β Work item created
Step 2.Β Get value from the Project field "Country (project)"
Add componentΒ β New condition β Work item fields conditionΒ
Β
Step 4. Get the authorization token
Add the steps βGet the Projectrak JWTβ and then βStore the JWT in a variableβ, described at this link: Setup - βοΈ Create a Projectrak authorization
Important:
If you donβt have already created a Projectrak API token , you have to do so as described in the first steps of the above link. If you have already got it, you can reuse it.
Β
Step 5. Get value from the Project field "Country (project)"
Add componentΒ β New actionΒ β Send a web request
For this example, our Country (project) from Projectrak has the ID: 65934Β
Β Replace using your own ID
Web request URL:Β https://profields-cloud.deiser.com/values/projects/{{project.id}}/fields/65934
Headers:
Content-Type: application/json
Authorization:Β Bearer {{projectrakJwt}}Β Β βΒ defined in step 4
HTTP method: GET
Web request body: Empty
Check:Β Delay execution of subsequent rule actions until we've received a response for this web request
Β
Step 6.Β Compare work item value with project value
Add componentΒ β New condition βΒ Advanced compare condition
First value:Β {{webhookResponse.body.value.formatted}}
Condition: does not equal
Second value: Empty
Β
Step 7.Β Update the work item with the Projetrak value
Add componentΒ β New action β Edit work item
Choose fields to set: Country (work item)
Value:Β {{webhookResponse.body.value.formatted}}
Β
Rule 2:Β Update work items with Projectrak valueΒ every day
Step 1. Schedule an execution
Add trigger β New action β Scheduled
Run rule every: 1 Weeks
On: Every weekday
At: 9:00 am
Check:Β Run a JQL search and execute actions for each work item in the query
Β
Step 2.Β Check Country (work item) field is not emptyΒ
Add componentΒ β New condition β Work item fields conditionΒ
Β
Step 3. Get the authorization token
Add the steps βGet the Projectrak JWTβ and then βStore the JWT in a variableβ, described at this link: Setup - βοΈ Create a Projectrak authorization
Important:
If you donβt have already created a Projectrak API token , you have to do so as described in the first steps of the above link. If you have already got it, you can reuse it.
Β
Step 4. Get value from the Project field "Country (project)"
Add componentΒ β New ActionΒ β Send a web request
For this example, our Country (project) from Projectrak has the ID: 65934Β
Β Replace using your own ID
Web request URL:Β https://profields-cloud.deiser.com/values/projects/{{project.id}}/fields/65934
Headers:
Content-Type: application/json
Authorization:Β Bearer {{projectrakJwt}}Β Β βΒ defined in step 3
HTTP method: GET
Web request body: Empty
Check:Β Delay execution of subsequent rule actions until we've received a response for this web request
Β
Step 5. Compare work item value with project value
Add componentΒ β New Condition βΒ Advanced compare condition
First value:Β {{webhookResponse.body.value.formatted}}
Condition: does not equal
Second value: Empty
Β
Step 6. Update the work item with the Projetrak value
Add componentΒ β New Action β Edit work item
Choose fields to set: Country (work item)
Value:Β {{webhookResponse.body.value.formatted}}