I want to achieve the following via Jira Automation:
I want to integrate Jira and Tempo. So basically there is a work attribute in Tempo called SR&ED. I have added a custom field in Jira where I can select SR&ED as Yes. I want this Yes field in the Jira ticket to check mark the SR&ED in Tempo as true automatically when I log hours for this ticket in Tempo.
This is my payload request:
{ "attributes": [ { "key": "_SR&ED_", "value": true } ], "startDate": "{{now.format("yyyy-MM-dd")}}", "authorAccountId": "{{issue.fields.assignee.accountId}}", "timeSpentSeconds": 3600 }
This is the endpoint I am using from Tempo
method: PUT
https://api.tempo.io/4/worklogs/_SR&ED_
error I am facing:
{"errors":[{"message":"Worklog cannot be found"}]} |
Not sure how to proceed here. Can someone please help me?
Hi @Mohammed_Kagzi -- Welcome to the Atlassian Community!
Your expression has nested double-quotation marks for the startDate attribute.
Rather than using the format() function, try the inline function, jiraDate format instead, or use format() without the outer quotation marks, adding them with the asJsonString function.
{
"attributes": [
{
"key": "_SR&ED_",
"value": true
}
],
"startDate": "{{now.jiraDate}}",
"authorAccountId": "{{issue.fields.assignee.accountId}}",
"timeSpentSeconds": 3600
}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.