You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi, Atlassian community!
I have a need to automate labor planning Tempo Plan.
I started doing automation and ran into a problem.
I don’t quite understand how to copy data from JSON received in “GET” to “PUT” and thereby update the time in tempo.
Thanks for any help!
JSON result ("GET")
[
{
"id": 58748,
"assignee": {
"key": "adm_bot",
"type": "user",
"userKey": "JIRAUSER84272"
},
"planItem": {
"id": 12345,
"type": "COMPONENT",
"projectId": 0
},
"scope": {
"id": 12345,
"type": "none"
},
"commitment": 25,
"secondsPerDay": 7200,
"includeNonWorkingDays": false,
"start": "2023-10-30",
"startTime": "14:00",
"end": "2023-10-30",
"seconds": 7200,
"created": "2023-10-30",
"createdBy": "adm_bot",
"createdByKey": "JIRAUSER84272",
"updated": "2023-10-30",
"updatedBy": "adm_bot",
"recurrence": {
"endDate": "2023-10-30",
"rule": "NEVER"
},
"planApproval": {
"requester": {
"name": "adm_bot",
"key": "JIRAUSER84272",
"displayName": "ADM bot"
},
"reviewer": {
"name": "string",
"key": "string",
"displayName": "string"
},
"actor": {
"name": "adm_bot",
"key": "JIRAUSER84272",
"displayName": "ADM bot"
},
"statusCode": 1,
"latestAction": {
"key": "SUBMITTED",
"message": "submitted"
},
"updated": "2023-10-30 17:08:26",
"created": "2023-10-30 17:08:26"
}
}
]
in "PUT" request , i try add custom data ,something like :
Custom data*
{
"allocationId": {{webhookResponse.body.id}},
"assigneeKey": "adm_bot",
"assigneeType": "string",
"day": "2023-10-30",
"end": "2023-10-31",
"includeNonWorkingDays": false,
"partialUpdate": true,
"planItemId": {{webhookResponse.body.planItem['id']}},
"planItemType": "ISSUE",
"plannedSeconds": 0,
"secondsPerDay": 72000,
"start": "2023-10-30",
"startTime": "19:00"
}
My expected result: The time in TEMPO plan will be updated to 20 hours. But apparently something went wrong..
After numerous attempts to wedge smart value into the Automation rule - "Send web request" for frame "custom data", I succeeded! The expressions (smart value) look like this.
"allocationId": {{webhookResponse.body.id}}
"assigneeKey": "{{assignee.key}}"
"planItemId": {{webhookResponse.body.planItem.id}}
+ my screen. I hope this is useful to someone
I finded documentation
https://confluence.atlassian.com/automation/jira-smart-values-json-functions-993924865.html
tomorrow trying make it.
+ possible solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.