Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Auto create sub-tickets using Groovy Script Runner

Sravan Kumar April 11, 2018

Hello,

Using Script Runner can Jira create sub-tickets automatically?

For example if I choose the drop down custom field value to be 'YES' for a custom field value 'Laptop Required', can Jira create a sub-task for that and assign it to respective team member?

 

 

Thanks in Advance!!

1 answer

0 votes
Daniel Wong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2018

Hi @Sravan Kumar

Yes you can create sub-tasks automatically with Script Runner. This function is already built into the add-on's postfunction builtin scripts.

You can find documentation on this here - https://scriptrunner.adaptavist.com/5.3.9/jira/builtin-scripts.html#_create_a_sub_task

Sravan Kumar April 12, 2018

Hello Daniel,

Thank You very much for the quick response!!

Seems like this possible after the transition has happened(have these conditions in the post functions for Jira to create auto-tickets) but can we have sub-tickets created based on the Custom field values? with out any transition changes?

Daniel Wong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2018

I see. In that case, you should look into Builtin Listeners. Documentation on how to use Listeners with Scriptrunner is here - https://scriptrunner.adaptavist.com/5.3.9/jira/listeners.html

I suggest you read through what a Listener is in Atlassian's KB to give you an idea of how it works - https://confluence.atlassian.com/adminjiraserver071/listeners-802592235.html

Another point to note is to make sure you test this out in a dev/staging instance as this could go wrong very quickly and you end up with a lot of duplicate sub-tasks.

Sravan Kumar April 16, 2018

Ok. Sure..Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events