On this page
Use case
Add links to the issues included in a ScriptRunner Issue Picker field and delete them if the issues are removed from the field automatically.
Configuration
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.
Field changed event
Add a trigger → Field changed event
Field
Select the ScriptRunner Issue Picker field
Change to
Select Any value
Boolean condition
Add a Condition next to the trigger → Boolean Condition
Expression
Use the following Parser Expression after replacing the project key with the one of the project of your choice.
%{trigger.issue.project.key} = "CASE"
Delete issue link
Next to the Boolean Condition click on Add → Action → Delete issue link
Issue link type
Choose relates to (Relates)
Issue selection
Choose All issues
Boolean condition
Add a Condition under the action → Boolean Condition
Expression
Use the following Parser Expression.
%{trigger.issue.cfIssuePicker} != NULL
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
issueKeysToIssueList(%{trigger.issue.cfIssuePicker})
Enable the rule by clicking on the Enable button →
Related use cases
Use case JWT feature Workflow function Parser functions Label Add links to the issues in a ScriptRunner Issue Picker field issueKeysToIssueList() toString() toStringList() replaceAll() previousValue() Create issue link when issue is created issuesFromJQL() Track issues mentioned in comments
If you still have questions, feel free to refer to our support team.