Forums

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

I need urgent groovy script for creat of multiple subtasks with custom fields

Nageswararao September 28, 2022

How to create multiple subtasks for parent issue and  in subtasks shown as multiple custom fields and 

2 answers

0 votes
Nic Brough -Adaptavist-
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.
September 28, 2022

There's an example of creating a sub-task at https://library.adaptavist.com/entity/create-a-sub-task-and-link-to-parent-issue-in-jira

But I'm afraid I don't understand the rest of the (cut off, I think) question.  My guess is that you have a parent issue that has one or many values selected in a multi-select field and you want to create a sub-task for each value in the list.

0 votes
Craig Nodwell
Community Champion
September 28, 2022

Hi @Nageswararao could you please clarify your question the way it is now is very confusing.

Nageswararao September 28, 2022

Hi,

Thanks for your response 

 

1.When a new issue (story/task) is created -

 A) a list of sub-task should get linked automatically

B) The assignee for the sub-task

C) label field 

Nic Brough -Adaptavist-
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.
September 28, 2022

You can do this with a bit of modification to the script I've pointed to.

But you still haven't told us what you're trying to do.

It's clear that you want "issue create" to spawn a load of sub-tasks, presumably on the issue being created, but what are the rules for deciding what to create?  A fixed list of X items?  One per component or multi-select list value?  Who do you want to assign them to?  What labels are you wanting to add?

Nageswararao September 28, 2022

Hi,

 

Thanks for your response 

 

 

 

1.When a new issue (story/task) is created -

 

 A) a list of sub-task should get linked automatically

 

B) The assignee for the sub-task

 

C) label field 

Nic Brough -Adaptavist-
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.
September 28, 2022

Repeating what you said already does not answer the questions.  There's a reason I asked them - we can't help you without a clear definition of what you're trying to do.  Best we can do at the moment is link to the script I gave earlier.

Suggest an answer

Log in or Sign up to answer