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?
You should use the worklog endpoint instead of work attribute endpoint.
https://tempo-io.slack.com/archives/C05G22J2M55/p1741803584323609
Best regards,
Susan
Tempo Product Expert
Tempo Ecosystem
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.
Hey Bill,
Thank you for your message. But it seems like the error is regarding the Worklog not being found. I am not sure what the issue is here. I did try the change that you recommended, but it is the same issue.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case, please check the Tempo API documentation to learn if there is something missing in the message.
Perhaps also try running the call from outside of the rule, with a tool such as Postman, to fault isolate if the cause is the message or the rule calling the endpoint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.