Forums

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

Copy Time Log to linked issues based on last run of rule

Nicole_Brueckner November 20, 2023

Dear all, 

We have the use case, that we want to copy the logged time from one issue to the corresponding linked issue. 

Within the automation I created the variable with "{{issue.timetracking.timespent}}".

My issue: This variable is always getting the whole sum of the time spent, but I just want to copy the time spent while this booking. 

e.g. I have booked in 3 steps one hour, two hours, three hours I will not receive 6 hours, instead i will have 10 hours. 

Is there the possibility to calculate this: 

- current timetracking - lasttimetracking (based on last run)

- just copy the new booking? 

Best-,

Nicole

2 answers

0 votes
Nicole Brückner November 20, 2023

Hi Bill, 

Thanks for your advice

This is my current setup. I also tried it with "{{worklog.timeSpent}}" but both are just giving the sum of booked time back. 

 

Value time log.png

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.
November 21, 2023

When responding please try to stay with one thread.  That will help others in the future reading this question to know if there are multiple solution approaches.  Thanks!

 

Next, your trigger is for any updates to Work Logged, and so that will not include new entries.  Is that what you want?  If you want all changes please remove the Updated selection from the trigger.

 

I am using Jira Cloud, not Server...and that has two sets of smart values:

  • {{worklog}} is for the log just made for the trigger, such as {{worklog.timeSpentSeconds}}
  • {{issue.timetracking}} is the total for the issue, such as {{issue.timetracking.timeSpentSeconds}}

Please check if those are both available for the Server version.

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.
November 20, 2023

Hi @Nicole_Brueckner 

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, and an image of the audit log details showing the rule execution.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

Are you using the Work Logged trigger?  If so, please use the {{worklog}} smart value, as that is the one the trigger provides for the time which was just logged, and not the totals for the issue: https://confluence.atlassian.com/automation/jira-smart-values-issues-993924860.html#Jirasmartvaluesissues-worklog

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events