Trying to automaticaly update time spent field but I get an error.

isabel_p_cardoso_hotmail_com February 18, 2025

Can someone please help me if this case. I have created a variable that calculates end date - start date and gives me time spent on an issue, but when I try to update time spent field, I get this weird error: Worklog must not be null. Invalid time duration entered. (timeLogged).
But my worklog variable does have value, as you can see from the audit log below:

image.png

1 answer

0 votes
Harrison Ponce
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.
February 18, 2025

Hi @isabel_p_cardoso_hotmail_com , I tried to test this out on my own and made this work with a simpler approach not needing variables. For me, using the Start Date and Due Date fields, I did the following:

WHEN: Value changes for due date / start date

THEN: Log work

  • Time spent: {{due date.diff(start date).days.abs}}d
  • Date started: {{now}}

Would that work for your use case (of course swapping out for the fields you're using?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events