Example: Create issue links based on a custom field value avoiding duplicates
In this example, issue links between issues with the same custom field value should be added avoiding duplicate links, e.g.
Given three issues with the same value for the custom field "Custom-ID", Ticket A, Ticket B and Ticket C. When executing the transition on Ticket A, Ticket B and C should be linked to Ticket A. When now executing the transition on Ticket B, only Ticket C should be linked to Ticket B since Ticket A was already linked in the previous transition execution. In order to add issue links on a transition, the Create issue link post function is used.
The configuration will look like this:
Issues returned by JQL expression is: key != %{00015} and Custom-ID ~ %{12200} and key not in linkedIssues(%{00015})
Note that:
- %{00015} is the field code for "Issue key"
- %{12200} is the field code for the custom field "Custom-ID" (this field code might differ on your instance)
Once configured, the transition will look like this:
See Result screenshots "Create issue links based on a custom field value avoiding duplicates"
Other examples of that function
- Automatically create an issue link after issue creation on email by "Enterprise Mail Handler for Jira" app
- Create issue links based on a custom field value avoiding duplicates
- Creating issue links to issues with the same "Summary"
- Parse description for creating issue links
- Replace certain issue link types with different ones