Forums

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

How do I search for linked issues using an automation?

Andre de Castro
Contributor
September 6, 2024

Hello, everyone.

I have an automation that creates a new card (B) when I change the status of a card (A), linking the two. This works correctly.
But now, I need the new card (B) to have the same related issues as card (A).
How can I improve this automation so that the related issues from card (A) are copied to card (B)? Thanks for your help

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
September 6, 2024

Hello @Andre de Castro 

Whenever you ask for help with an Automation Rule, it will enable us to help you more effectively if you provide screen images showing the entire rule and the details of each step.

We can't advise you on how to improve a rule when we don't know the components of the rule you're trying to improve.

Andre de Castro
Contributor
September 9, 2024

Hi, Trudy.

This is the automation I'm trying to do and it's not working 100% ok.
As I said before, when card A is transacted from status, card B is being created in another project and both are linked.
Now I need to take the linked issues from card A to card B and that's not working.
The message I get is that no items were found in the search.
Thank you.
jira3.JPG

Trudy Claspill
Community Champion
September 9, 2024

Thank you for that additional information.

Have you verified that the issue that triggered the rule has issues linked to it, using the View All Issues interface?

Are the issues linked to it in the same project as it, or different projects?

What is the Scope for the rule according to the Rule Details page? If the linked issues are in different project you will have to use a Multiple Project Scope rule and identify all the projects in which linked issues might exist. The Lookup Issues action is limited to retrieving issues that are in Projects that are in the Project Scope of the rule.

 

Andre de Castro
Contributor
September 10, 2024

Hi, Trudy

“Have you checked whether the problem that triggered the rule has problems linked to it, using the View all problems interface?”
==> Yes

“Are the issues linked to it in the same project as it or in different projects?”
==> Different projects

“What is the Scope of the rule according to the Rule Details page? If the linked issues are in different projects, you need to use a Multi-Project Scope rule and identify all the projects in which the linked issues may exist. The Search for problems action is limited to retrieving problems that are in projects that are in the scope of the rule's project.”
==> I've now adjusted the rule to global scope. Thanks

Result ==> The target card (B) continues to be created and linked to card A.
The automation now finds the related issues but they still don't appear related to card B. I still don't know how to solve it.

Jira4.JPG

Jira5.png

Trudy Claspill
Community Champion
September 11, 2024

Hello @Andre de Castro 

I recommend you use make these changes:

Delete the Lookup Issues action and the Create Variable action.

Within the Create Issue action select the Linked Issues field to set. Use that to create the link between the newly created issue and the trigger issue.

Delete the Link Issue action after the Create Issue action.

At that point add a Branch - For: Related Issues: Linked Issues. In this position the branch will iterate through all the issues linked to the trigger issue.

Within that branch add a Link Issue action. You can use a smart value to get the issue key for the issue you created in the rule, to link each of the trigger issue's linked issues to the issue that you created in the rule.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--createdIssue--

Here is an example:

Screenshot 2024-09-11 at 1.19.52 AM.png

Andre de Castro
Contributor
September 17, 2024

Hi Trudy.
After your guidance, the automation worked correctly. Thank you.
However, I didn't understand the use of smart value so I linked the issues (in the trigger issue) to the new issue created.
Just one more question...
Is it possible to make the linked issues in the newly created issue have the same type of link that they had in the trigger issue?
At the moment, they all have the same type.


jira6.JPG

Trudy Claspill
Community Champion
September 17, 2024

Hello Andre,

The first solution that comes to mind is to use multiple Branches with each one selecting a specific link type.

Screenshot 2024-09-17 at 1.29.06 PM.png

 

In each Branch in the Link Issue action you would choose the matching link type.

Andre de Castro
Contributor
September 18, 2024

Thank you once again.

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events