Create multiple sub-task per cf multi-select dropdown

Ronen Erlich February 5, 2020

Hi community,

I have the following situation:

a ticket has a dropdown to select and application, and also within the application there is additional drop down (separate one) to select groups.

the main ticket needs to be approved by the manager

once it is approved, i need to create a sub-task ticket for the owner of each group.

I'm trying to write my own code using post-function. i can not use the scriptrunner create subtask as I need to open multiple subtasks at the same time.

also, for each group I created a component and the owner is to be assigned to it - so I don't have to add the owner in my code and can manage it via components.

 

so the first part with the manger to approve is already automated.

the second part when I need to create the subtask is where i got stuck and some help:

 

so basically what i am trying to do is:

def cf = get the drop down field for group

def cf_val = get all the selected values for groups

 

for each cf_val

create a subtask and

set subtask summary

set subtask component

 

Thanks in advance,

 

1 answer

0 votes
Fernando Bordallo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 6, 2020

Hello @Ronen Erlich

The process you are following seems more than reasonable. You should be able to call the createSubTask endpoint several times (as many as users in the group you have). Where are you encountering the difficulty?

Suggest an answer

Log in or Sign up to answer