Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Creating subtasks with jmwe groovy script

I want to create multiple subtasks which is equal to the number of components in the project using groovy script in jmwe while creating an issue.Could someone please help with the code.

1 answer

0 votes

Why would you like to do this with Groovy scripting (I assume you mean a Scripted (Groovy) post-function? You can achieve this with the Create/Clone Issue(s) post-function, using the "multiple issue creation" option.

For the iterator script, use:


Then, in the rest of the configuration, you'll be able to refer to the "current" component (since the post-function will be iterating over the components and will be creating one issue for each) as:


For example, you could copy the current component to the Component/s field of the sub-task by adding the Component/s field in the "Set fields of new issue" section and setting it to "Set value to Groovy Expression" with this expression:


or you could append the component name to the sub-task Summary like this:

New sub-task for component ${}

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Do Not Lose your Customer’s Trust

Missing deadlines is one of the biggest problems every team lead wants to avoid when dealing with managed services. When the customer contracts your company to help with IT services it is expected th...

24 views 0 0
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you