Use case
Save time and link the created issue to its appropriate issue links automatically. For this rule, when creating a Task in a project with the key "CS", this task will get linked issues from all sub-tasks within the same project and with the summary "Maintenance".
⚒️ Configuration
Issue event
Create a new rule and name it appropriately.
Providing a description will help you to identify what the rule does but this step is optional.
Add a trigger → Issue event → Issue Created
No further configuration is needed. The automation rule is triggered every time an issue is being transitioned.
Boolean condition
Add a Condition → Boolean Condition
Expression
Use the following Parser Expression:
%{trigger.issue.project.key} = "CS" and %{trigger.issue.issueType} = "Task"
Create issue link
Next to the Boolean Condition click on Add → Action → Create issue link
Issue link type
Choose relates to (Relates)
Issue selection
Choose Issue List Expression
Use the following Parser Expression:
issuesFromJQL("issuetype = 'Sub-task' AND summary ~ 'Maintenance' AND project = '" + %{trigger.issue.project.name}+"'")
The issuesFromJQL() expression parser returns the issue list of issues returned by the specified JQL query. Visibility restrictions (permissions and issue security) might apply. By default, this query will be run as the current user.
Enable the rule by clicking on the Enable button
📤 Import the example
Import the JSON file below to get started in no time