We need to automatically create a child ticket whenever a ticket of a specific issue type is created. Could you please suggest a ScriptRunner script for this?”
I understand that you are inquiring about the use of ScriptRunner. However, I recommend considering Automation, as it readily supports this scenario.
You can select the specific issue type and the child tasks.
If you were already aware of Automation and still prefer to use ScriptRunner, I apologise for any oversight.
Cheers.
Hi,
I would suggest to go ahead and create the ticket via Automation - that's quick.
Anyhow, if looking for child issues (as I'm counting your ask as subtask) check https://www.scriptrunnerhq.com/help/example-scripts/create-a-subtask-cloud
https://www.scriptrunnerhq.com/help/example-scripts/create-a-task-cloud
You may need to alter more for your requirements with above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sachin,
You could achieve this use case using ScriptRunner for Jira Cloud.
To achieve this use case, I would advise using a Script Listener.
Using this feature, you can configure it to run on the Issue Created event and add a condition in the conditions box to make it run for only specific issue types. We have an example of the condition to do this here that you can use as an example.
Finally, we have an example script here that shows the code for creating a subtask.
The config then looks like the screenshot below.
I hope this helps.
Regards,
Kristian
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.