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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Sam Harding Atlassian Team 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

0 votes

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?

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Announcing Mindville Insight is now part of Jira Service Management!

Hello Community! We’re excited to announce that Mindville Insight’s asset and configuration management capabilities will now be integrated into Jira Service Management Premium and Enterprise plan...

600 views 9 14
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you