Forums

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

Dynamically create multiple issues based on Field values

Madhuri Kallem November 2, 2022

Hi, I am trying to achieve the following task based on a numeric value (X):

If category in (A, B, C):

           Create 2*X issues/tickets:

Else:

          Create X issues/tickets. 

Can someone please tell me how can I do this in jira project automation?

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Ismael Jimoh
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.
November 2, 2022 edited

Good day @Madhuri Kallem 

@For your request may I ask if you have Jira scriptrunner and if you are familiar with groovy scripting? If yes, then you can achieve this with the add-on by adding your script into the post function of your workflow.

Scriptrunner addon: https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?tab=overview&hosting=server

Scriptrunner examples: https://scriptrunner.adaptavist.com/6.19.0/jira/recipes/workflow/servicedesk/clone-issue-sd.html

 

I am not sure this is achievable with project automation as I don’t think it has a logic to match the For expression.

Madhuri Kallem November 2, 2022

Hi @Ismael Jimoh Thank you for the quick response. No I am not familiar with Jira scriptrunner  and groovy scripting. Are there any examples / tutorials that I can follow to achieve this task? 

Ismael Jimoh
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.
November 3, 2022

Hi @Madhuri Kallem 

You can find a sample of how to create an issue here.

If your field with the number X is a number field then you will need to run a for loop to check the value and count.

You can read about the for loop here.

Regards.

Madhuri Kallem November 3, 2022

@Ismael Jimoh Thank you! Appreciate your help. 

Ismael Jimoh
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.
November 4, 2022

You are welcome.

Suggest an answer

Log in or Sign up to answer