Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,433
Community Members
 
Community Events
184
Community Groups

Copy worklog from a linked issue using Jira Automation

Hi 

I currently have 2 projects. Project A is a Service Project and project B is a Business project.

 

I have a couple of basic automation rules in place. 

 

I need to copy the worklog from project B to project A using Automation.

 

I need some assistance with this as I am new to Automation and can cope with the basiscs.

 

Any assistance would be appreciated.

 

2 answers

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 08, 2021

Hello @Otto Van Straaten ,

Using the work logged or field changed to trigger with the values for the work log, the entries for work logs are independently stored item are not tracked in Jira as a field change history item due to how the work log is stored as a specialized item apposed to a direct field value. 

So to get the time log entered into the rule you need to create a variable to store the value you want to pass to the other issues.

This can be achieved with a global automation rule, and inputting a {{Create Variable}} action to store the work log item to be reused for the follow-up actions within the linked issues.  and you can use an automation rule like this:

Screen Shot 2021-03-08 at 11.21.47 AM.png

Regards,
Earl

Hi Earl

This works great thank you.

The only issue that I have picked up is that whenever the time is logged against the linked issue the time spent is not correct.

When time is logged the first time both issues have the exact same time spent.

When time is logged a second time it adds the original value plus the new time logged, e.g. I logged 5 mins of work in project B and the time logged is 5 mins in project A.

When I log another 5 mins in project B (total time logged 10 mins) the time logged in project A is 15min.

 

Is there a way around this?

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 31, 2021

HI @Otto Van Straaten ,

I was not able to get this behavior to trigger in my test instance, so i'm wondering how do you have the rule configured, and what are the link types on the two issues used for the trigger?

I am wondering if the rule is getting triggered on multiple issue link types between the two issues,  i.e. if you have both "blocks" and "related to" the rule might be triggering for each link.

Alternatively, if the rule might be getting triggered on the issue by the rule editing the worklog, so it does a double edit, check the rule details and make sure that the option for "Allow rule Trigger: Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule." is unchecked so that rule does not trigger itself reciprocally.

Let me know what you find.

Regards,
Earl

Hi @Earl McCutcheon Thank you for providing such a simplistic solution, I've been racking my brain for days trying to get this automation to function properly. However, I'm getting the same issue as @Otto Van Straaten stated. I checked all the items you recommended and I'm only using 'relates to' and I've had the 'Allow other rule...' unselected. I also tried only using the automation for updated work logged operations and that disabled the automation completely. I'm SO close to getting this automation to work the way I need, do you have any other suggestions to make the aggregate calculation on the linked issue correct?

Use Case: 1 Issue in Project A has many issues linked from Project B. The original estimate is entered in Project A for contractual hours. Original estimates in project B are from estimates for completion of issue. We would like work logged for all issues in Project B to aggregate into logged work for Project A. 

 

Thank you, 

Christine 

Try {{worklog.timespent}} as a smartvalue, rather than {{issue.worklog.timespent}}

0 votes
Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 07, 2021

Hi @Otto Van Straaten 

It is possible to set worklogs on an issue using automation, by using smart values and setting the JSON values in an issues 'Additional Fields' section (see https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/#field-syntax-examples for some examples of this). However, I am not sure how this automation would work, as it is expecting a trigger from an event related to an issue. What event would you be expecting to fire off your rule?

Cheers

Sam

Hi @Sam Harding 

Thank you for the advice.

I finally got it working using Edit issue fields.

I am now struggling to get the worklog comments moved over to the linked issue.

Do you have any advise?

Screenshot_1.pngScreenshot_2.png

Hello.

This works when time is logged the first time, but if I edit the time in the original issue, in the linked issue duplicate the time.

Any idea how to control that? Thks,

Suggest an answer

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

Atlassian Community Events