I am using Jira Cloud and ScriptRunner.
I have created my own links called "Parent of" and "Child of".
Our structure we use is Story > Task > Subtask. The stories are connected to the tasks by these custom links.
When a story is created it is given a label that mirrors the name of the story. The tasks are also given this same label.
I would like to write a script that does the following:
That way, if the label is put on the story on creation and then added to a task, the "Parent of" and "Child of" links are automatically added.
Hi Kimmy,
In order to do this you should look at using a script listener configured to run on the issue created and issue updated events.
The script listener should then look to get the fields for the issue and check the labels on the issue using the rest API outlined here.
If the label is found then you should look to add the issue links using the rest API outlined here.
You may find the example in the documentation here useful to help you getting started with the fields from the issue.
Thanks
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.