Hi All,
I am looking for some help to create 50 subtasks when a issue with issuetype story or task is created in a project using the script runner addon
while the subtasks are created, each subtask should have different assignee, summary and description values based on the information we get from the users, can anyone help me with the script which i can use in script runner add on which can create 50 subtasks in one step and have its own field values
Thanks in advance
Hey @RNV Jira1 ,
What @Hana Kučerová says is indeed the easiest solution. Only drawback there is you'll have to create 50 postfunctions (1 for each task)
If you want to script it as a single script (like a loop) you can look at the Adaptavist library script to get you started.
https://library.adaptavist.com/entity/create-a-sub-task-and-link-to-parent-issue-in-jira
If you take the logic from this script but loop it you can use it for as many as you want!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @RNV Jira1 ,
there is the post-function called “Create a sub-task” available. I recommend you to use it, I believe it will be much easier. See the documentation:
https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_create_a_sub_task
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Hana Kučerová & @Dirk Ronsmans your inputs have helped working on the script. Can you please also provide some guidance with setting value for a custom field which is of the type as "label"
I tried this
"def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'labels1'}
issue.setCustomFieldValue(cf, 'my value') "
but it did not work for the custom field which was of label type, rest of the custom fields were getting updated. So can you please help with the script which might work for updating the label custom field
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't have experience with that personally but you can look here
https://library.adaptavist.com/entity/update-the-labels-for-an-issue-in-jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.