I am trying to link issues with the same label.
So if I create 10 issues with the label "test" I'd like to run a rule to link them.
This is the automation I'm working with and not getting any success :( th right now and have not had any success
Hello @Brian Alves
Welcome to the Atlassian community.
What event do you want to trigger this rule? Do you want it to be triggered each time a new issue is created, then have it find all the other issues with the same label as the trigger issue, and link the trigger issue to all the issues found?
Do you want to trigger the rule after all 10 issues have been created? And then create a link between each of those 10 issues and all the other 9 issues in the set (so each of the 10 issues has links to 9 other issues)?
An issue can have more than one value in the Labels field. How is your rule going to know the relevant Label value?
Do you want to be able to run this rule for different label values?
Hi @Trudy Claspill !
Yes I would like to run on every issue and group specific labels with each other. I'm hoping to have multiple labels then create a rule for each label to link with eachother.
If I create an initiative with 10 items in it and 2 labels. So 5 items would have label 'test' the other 5 would have label 'test2' then the automation would link issues with the same label together. Not necessarily to any trigger issue.
Does that make sense?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am still not clear on when you want the rule to trigger.
Let us say it is triggered upon the creation of a single issue. And that issue may have 0..n Labels values.
I think this is the type of flow you're looking for. Correct me if I'm wrong.
When issue created
And Labels is not empty
For each Labels value
Find other issues that have the same Labels value
For each issue found
Link that issue to the rule's trigger issue.
Unfortunately Automation Rules don't support nesting For branches in that manner.
Are you trying to incorporate this linking into an Automation Rule where you are also creating the Initiative and the child issues? Or is the issue creation being done manually?
Might you create more issues with the same Labels that you used previously ('test' and 'test2')? Should those new issues be linked to the ones created before?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ah okay so I will keep this simple
If I create issues that share the same label I want to them to automatically linked to one another based on label. So if I create 10 issues with 1 label in each of those issues then they should all connect to one another.
When issue created
Label = test
Link to one another with label
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you want this triggered when an issue is created?
And you are willing to hard-code the label value into the rule?
In that case the flow would be:
When Issue Created
And Labels in ("test")
For Related Issues / JQL
JQL: key != {{triggerIssue.key}} and Labels in ("test")
Link issues
link to Trigger Issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! The first part is great, but I'm still having a tough time linking every item to one another.
So Task1, task 2, task 3, task4 and task5 are created
task 1 should be linked to t2 t3 t4 t5
task 2 should be linked to t1 t3 t4 t5
task 3 should be linked to t1 t2 t4 t5
task 4 should be linked to t1 t2 t3 t5
task 5 should be linked to t1 t2 t3 t4
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since the rule is run as each issue is created, and if they are created in the order of t1 through t5...
The rule will trigger when t1 is created. There will be no issues to link to at that point.
The rule will trigger when t2 is created. At that point there is only t1 that matches, so t1 will be linked to t2.
The rule will be triggered when t3 is created. At that point t1 and t2 match, so t3 will be linked to each of them.
At this point t1 is linked to t2 and t3. t2 is linked to t1 and t3. t3 is linked to t1 and t2
The rule is triggered when t4 is created. t1, t2, and t3 match, so t4 will be linked to all of them
The rule is triggered when t5 is created. t1, t2, t3, and t4 match, so t5 will be linked to all of them.
In the end after the rule runs for each newly created issue, they will all be linked to each other.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahhh I'm not getting that it's only linking to the trigger issue. But I am utilizing another automation to create the tickets, does tha tmake a difference?
Currently I am creating a task
if task is created the create subtasks
subtasks have these labels which is where I need the linking done
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I asked you about that...
Are you trying to incorporate this linking into an Automation Rule where you are also creating the Initiative and the child issues? Or is the issue creation being done manually?
If you want to try to incorporate this into another rule where you are creating the issues then please show us that complete rule.
Keeping the linking rule as a separate rule should work. However there may end up being timing issues. I recommend that you do a limited run test to see how it works out.
Given that these are subtasks that have the labels you can enhance the rules in some additional ways.
Also, if you keep this as a separate rule there is a checkbox on the Rule Details page that you will have to check to allow the linking rule to be triggered by the creation of issues in another rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah sorry I missed that. You did it! Thank you so much.
Last question for you, can I create a condition in JQL where it's only created today?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you can.
Add this
AND created > startOfDay()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can learn more about functions, keywords, and fields you can use in JQL here
https://support.atlassian.com/jira-software-cloud/docs/what-is-advanced-search-in-jira-cloud/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If my responses have helped you solve your requirement please consider clicking the Accept Answer button to mark your post as Solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Brian Alves
Welcome to the comunity!
You need to create a new branch to investigate the issue with the same labels, after which you can link the newly created issue with the others.
i.e
Hope this helps!
Best regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That assumes that the issue created (the trigger issue) has the value "test" in its Labels.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Samuel Gatica _ServiceRocket_ !
I would like to run on every issue and group specific labels with each other. I'm hoping to have multiple labels then create a rule for each label to link with eachother.
If I create an initiative with 10 items in it and 2 labels. So 5 items would have label 'test' the other 5 would have label 'test2' then the automation would link issues with the same label together. Not necessarily to any trigger issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.