Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I want to auto update a work attribute in Tempo using Jira automation

Mohammed.Kagzi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2025

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?

2 answers

0 votes
Susan Wu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2025

Hi @Mohammed.Kagzi 

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

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2025

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

Mohammed.Kagzi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2025

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.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2025

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events