Hello,
I have used the “create a sub-task” feature of Script Runner/Listener to create multiple sub-tasks for a specific issue type. Then I noticed the order of the subtasks I added changes when the issue type is being created. I would like to have the subtasks in an order. Is there a way to do that?
Thanks in advance.
Hi Elif,
Creating subtasks via Listener is async, which means that the order is not something that you can control. On the other hand, using a post function will create the subtasks with the order you define them, from top to bottom in the transaction's post functions. If you want to go with the listener, then you can control the order by writing a custom listener where you can define the order the subtasks will be created.
Thanos,
To use the post functions for this occasion, I need to create a specific work flow which associated with this issue type, right?
If I understand right, you want to change the order of the subtasks depending on the issue type ? If that is the case creating a new workflow would be an overkill. I would propose to do this via a custom post function or custom listener. If I remember well we discussed a very similar issue through support some time ago and we came up with a custom script, I think you can use that script with minor modifications.
I can make the small changes on that script except to add the project name. This issue type is being used by several projects and I would like to be sure to have the subtasks on the correct project. Can I send you the script for you to add the project name? Thanks in advance!
I have couple of questions about the script you have provided above, would you be willing to help?
Please let me know.
Thank you.
sure Elif,
Just open a new thread...
Here is the new thread ;
https://answers.atlassian.com/questions/39148629
Thank you so much!
Elif
Thanos, Can you please help? Thanks!
It looks like you're new here. Sign in or register to get started.