Forums

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

Calculate the end time of a worklog

Sam Brain March 12, 2025 edited

Hi !!

I am creating a rule where I need to calculate the end time of a worklog.

There doesn't seem to be a smart value for this. So I assumed I could create a new variable in my rule and assign it the smart value:

{{worklog.started.plusSeconds({{worklog.timeSpentSeconds}})}}

But this produces the following error:

Unable to render smart values when executing this rule: Failed to get value for worklog.started.plusSeconds({{worklog.timeSpentSeconds: {{worklog.started.plusSeconds({{worklog.timeSpentSeconds}})}}

The strange thing is - is that the error is showing a different smart value than the one I assigned?!

I have tried using asNumber to ensure the worklog.timeSpentSeconds is numeric but that doesn't help either.

Any assistance would be greatly appreciated.

Thanks Sam

2025-03-12_12-43-24.png 2025-03-12_12-46-22.png

2 answers

2 accepted

5 votes
Answer accepted
Wojciech Wardaszko
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 @Sam Brain

Welcome to the Community.

One thing: when using Smart values im brackets, you don't add the curly brackets again. It should be {{worklog.started.plusSeconds(worklog.timeSpentSeconds)}}

I hope this helps.

Cheers!

Sam Brain March 12, 2025

Perfect - thank you!!

2 votes
Answer accepted
Duc Thang TRAN
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

Hello @Sam Brain 

Can you try with this  smart value for variable 

{{worklog.started.plusSeconds(worklog.timeSpentSeconds)}}

 

Sam Brain March 12, 2025

Perfect - Thank you!!

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events