Copying fields to new issue that gets linked to existing issue

Benjamin Beach February 11, 2022

Hello, I am trying to write a rule in Automation for Jira Cloud so that when I create a new issue B and link it to an existing issue A from the create screen, the rule will copy some field from the existing issue A to the new issue B.  

I have tried all sorts of variations of the rule using the Issue Linked trigger and the linked issues branch rule, and the rules say they executed successfully, but nothing gets copied to the new issue B.   

From examining the audit log, I know that the Destination issue is B and the Source issue is A.   In the  "Copy from" action there is not an option for copy from "Source Issue".   I tried "Current Issue" and that does not work.

Has anyone done something like this successfully?   Thanks in advance!

Ben

2 answers

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2022

Hi @Benjamin Beach ,

Destination / Source depends on the linking goes inward or outward from the issue you are creating:

means:
if you create task B with link "causes Task A" --> Task A is the destination/Task B the source

if you create task B with (inward) link "is caused by Task A" --> Task A is the source/Task B the destination.

 

In order to provide a fitting solution it would be good to know the exact requirements (is there a specific link you want to match/catch?)

 

Best
Stefan

Benjamin Beach February 11, 2022

Hello Stefan,

Thanks for your reply.  I was originally using the "relates to" link, but the inward and outward links are the same.   So I was just testing without specifying a particular link type, and got the same results.    But the copy function only lets you choose from "Current issue, Trigger issue, Parent issue, Epic issue, or Destination issue"   Which would you use for source issue?

I appreciate your help!

Ben

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2022

Hi @Benjamin Beach ,

one more question from my side:

should this rule be limited to the the case where link is set during creation of a new issue or should this always be triggered when linking is set (also in already existing issues) ?

This might be an important requirement to choose the right trigger of the rule.

Best
Stefan

Benjamin Beach February 11, 2022

Hello Stefan,

I would like for it to trigger in either case - when linking an issue during creation or adding a link to an existing issue.   In both cases, I am looking to have fields copied from the issue I am linking to.

Thanks so much!

Ben

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2022

Hi Ben,

hmmm......it´s really tricky hahaha.....especially for the "relates" linking as this has just 1 direction and no inward/outward.

In fact I´m able to do a copy successfully (also depends on which fields you want to copy).

 

BUT: it really depends (and that could get "dangerous") which of the 2 issues triggers the rule. You know what I mean?


So maybe for better understanding (referring to your introduction):

Let´s say Task A has the fields the should be given/copied to a newly linked issue.

There is a big difference then if you create the link out of Task A or out of Task B.

 

Because in one case fields would be copied from task A to task B (which might be your expected solution) but if you create the link the other way round then the fields would be copied from task B to task A =S

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2022

Hi @Benjamin Beach ,

there is a really good community entry regarding linking:
https://community.atlassian.com/t5/Jira-questions/Issue-links-what-is-the-meaning-of-quot-inward-quot-and-quot/qaq-p/839095

soooo......I just created an example for the linking of "blocks/is blocked by" for some investigation and as this better describes the inwar/outward - source/destination thing.

image.png
Using the "Issue linked" trigger the audit log will always tell you which issue is source and which one is the destination:

image.png

 

Hope this helps a little bit or gives at least a bit more input for further investigation or experiments.

Just let me know if there is more input or further question from your side. Really curious to find a solution here :)

 

Best
Stefan

Benjamin Beach February 11, 2022

Hi Stefan,

Thank you so much for all the effort and thoughts you have shared.   I really appreciate it!  I will look at this and give it a try and I'll be sure to let you know how it goes!

Best regards,

Ben

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2022

You are welcome Ben :)

Sharing is caring and by trying to figure out solutions with my current experience I always learn a lot too :) So this is a win-win ;)

 

Looking forward to hearing from you how it works ;)

 

Best
Stefan

0 votes
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2022

The technique I illustrated recently to answer this other question...

https://community.atlassian.com/t5/Automation-questions/Adding-watcher-to-subtasks/qaq-p/1939011

...might work in your case also.

Benjamin Beach February 11, 2022

Thanks for your reply, but this does not help me.    I am not creating subtasks or any issues in the rule.   My trigger is when the issue is linked, and I'm trying to copy fields from the linked issue to the issue I just linked to it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events