Automation Rule Linked Issue created from task in project A & linked issue created in Project B

Paul Day June 4, 2021

I have two projects - Project A and B.  Support Issues are created as Tasks in Project A.  Bug Issue Types are then created from the Task in Project A using the "Create linked issue" link and the linked issue is then created in Project B.

I need to add an automation rule that auto populates a field with a value.  I need the rule to only apply to issues created as linked issues from Project A, where the linked issue is created in Project B.

Is this possible and if so, how would I do it?

1 answer

1 accepted

3 votes
Answer accepted
Ioana
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.
June 4, 2021

Hi Paul,

If I understand correctly you need an automation rule to populate a field with a certain value to the Bug ticket in Project B, each time a new Bug ticket is created in Project B and that is linked to a Task issue from Project A.

You could use an automation rule that is triggered by "Issue Linked".

Capture1.PNG 

Regards,

Ioana

Paul Day June 4, 2021

Hi Ioana, thank you for your help and the quick reply.  You have definitely set me on the right path, but I can't quite get the JQL for the "Linked Issue Matches" to work.  Please can you share the actual JQL code.  As you can see from the screenshot below, I'm not sure what to put at the start of the JQL. 

image.png

Ioana
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.
June 4, 2021

Hi Paul,

I will explain it step by step.

1. Trigger

  • Use "Issue Linked" for your trigger
  • Make sure to select the correct Link Type. You should see a drop-down as below, where you can select the link type you are interested in.
  • For my example below I selected "Problem/Incident" link type that I have in Jira as this link type has the "causes" and "caused by" relations. 

Trigger: 1.PNG

2. First Condition:

  • Now you want to make sure that the automation rule only runs for tickets with issuetype Bug that are in the DEV project
  • For that you can use a JQL condition to make sure the rule applies only to your project-issuetype combination

2.PNG

3. Second condition:

  • You now also want to make sure that your rule runs only for tickets that have been linked to a ticket that match the following criteria:
    • issuetype "Software Development"
    • project "ICE"
    • linked with Link Type relation "causes"
  • For that use the "Related issues condition", as you want to check that the linked ticket of your Bug matches the criteria
  • Select Linked Issues under Related issues
  • Link Type should be "causes" (the outward relation)  and not "is caused by". As you are now checking the linked ticket and not the bug ticket. 
  • Condition should be that All match specified JQL
  • THe Matching JQL should simply be the JQL to check project - issuetype combination from your initial project.  

3.PNG

4. And last step of course, would be to and an action.

Regards,

Ioana

Like Vikrant Yadav likes this
Paul Day June 4, 2021

Thank you Ioana for your excellent detailed instructions.  I have now setup the rule successfully.  Your help is most appreciated.

If anyone else encounters this issue, I had to set the rule to run across both project A & B in order to get it to work.

Regards,

Paul

Like Ioana likes this
Ioana
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.
June 4, 2021

You are welcome. I am glad you made it work!

Wim Abts December 8, 2021

Hi @Ioana 

An addition to the question above: I have the exact same requirement, but I only want to copy the value when the link is made with specific issues (as stated above).

There could already be some linked issues with the same link type, but that don't comply with the configures JQL.

I only want to copy the value when the link is set-up with those specific issues that comply to the JQL.

In the config as stated above, the 'Condition should be that All match specified JQL' is a problem as not all match, but I only want to copy when the one I'm linking with complies.

How can this be set-up?

Suggest an answer

Log in or Sign up to answer