Auto Sub-task Creation based on the below scenario

Exemplary Use Case:

Issue Type - XYZ I have a BP ID field. "If by mistake anyone creates the Main ticket instead of a subtask, the new ticket which is created should automatically get added as a Sub-task under the existing Main ticket with the same bp id".

For example -

I have created the issue WC-2213 with BP ID 88
instead of the subtask, I have raised another issue WC-2214 with the same bp id.
Manually go to More >> Convert to a Subtask we can convert the subtask and linked to WC-2213.

But my product team won't do manually so when they created the issue with same BP ID then it will automatically convert to a subtask.

Is it possible with the script Runner Add-On?

If yes then please give me a solution......

Appreciate your quick response....



1 answer

Hello Andrews.

This is less a question of wether it could be done, and more of a "should it be done":

This could be very easily done with the cloneIssue postfunction, setting the target issue to a subtask, and then deleting the original issue. 

You could also directly convert the issue, as it can be seen in that question.

However, the problem isn't about convertin issues, is about searching for a particular field on ALL of your issues.

If you do this, you need to search in your condition for every issue in your project, fetch the BP value(I don't know what BP is btw, could you clarify?) and then see if the issue created has a BP that is already present in that array.

If your project is small, then it shouldn't be much of an issue, however, having 2000 issues, and having to fetch a value for each of them everytime you create an issue could drastically decrease performance when doing this action.

Please clarify the whole BP ID thing, and let me know if this helped, or if I can help you further.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


247 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you