We need to find all tickets (several thousand in the project) that have the same value in a text custom field (an Engagement ID), then link them together. My findings is it is not possible to identify the matching tickets, grouped together, in a filter so an automation is required, thus I added the linking of the tickets to the automation.
I think I am very close, but I am getting an error that one of the fields does not exist or I do not have permission to view. I am the Administrator and can definitely view it. Also, when it references the field in the error, it lists the value in the field not the field name itself.
Here is my automation:
When rule is triggered: (selected multiple issue events) Issue Creation or Issue Update
If: Engage ID (field name) is not empty
Branch rule/related issues
Type of related issues: JQL
JQL: project = Test AND {{issue.customfield_10161}} ~ {{issue.customfield_10161}}
Will select "Only issue that have changed since last time this rule executed" after first successful run and linking
Then add value to Audit Log: Tickets from JQL are {{issue.key}}
Then: And Link issues - relates to Trigger Issue
I am unable to put the screen shot here.
I partially got it to work, but it is only linking the last tickets, not all tickets.
My correction to the initial rule -
Type of related issues: JQL
JQL: project = Test AND {{issue.customfield_10161}} ~ {{issue.customfield_10161}}
Changed it to -
Type of related issues: JQL
JQL: project = Test AND Engage ID ~ {{issue.customfield_10161}}
This allowed linking of all existing tickets when new ticket created, but then did not link to any new tickets. Only new tickets linked to new tickets.
Using the information from Marc, I added a Create Variable - named lookupissue and it equaled {{issue.key}}
When I ran this version, the new ticket "Test 3" linked to all the tickets in the project, including "Original Test" and "Test 2" ticket with the same Engage ID but "Original Test" and "Test 2" did not link, even though both linked to "Test 3"
My trigger is new or updated issues.
Would changing the trigger to scheduled have all tickets with same Engage Id be linked?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "And Link issue to" {{lookupissue}} - the smart value created before the branch - is not linking any tickets..... Changed back to using {{issue.key}} so it at least links some...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to branch on the variable.
To link only the lates tickets or specific tickets, have a specific Link type for this.
So this differentiates the issues that a re relevant.
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.