How we can create multiple issues based on custom field selection?

Shikher Kumar November 11, 2019

Hi,

We are using Jira service desk to manage resource demand at the firm level and we want an automation where whenever user mention in custom field (number field) that they need 5 resource of A grade (could be another field) and the moment they click on 'Create' it should automatically create 5 tickets or sub-task, is there a way we can do this by JWT or by any other mean?

Thanks

Shikher

4 answers

2 accepted

3 votes
Answer accepted
Thorsten Letschert _Decadis AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 11, 2019

Hi @Shikher Kumar ,

while I'm 100 % sure that your use can be easily implemented with the help of JWT, recommending the correct or best solution would require additional information with regard to what you're trying to achieve.

Have you already checked the uses cases documented? There are ones for fixed numbers of issues (e.g. https://apps.decadis.net/display/JWT/Create+3+issues+in+3+different+projects or  https://apps.decadis.net/display/JWT/Create+a+static+set+of+sub-tasks+with+unique+summaries) as well as dynamic numbers of issues (e.g. https://apps.decadis.net/display/JWT/Create+a+dynamic+set+of+sub-tasks+based+on+checkbox+selection+with+unique+summaries or https://apps.decadis.net/display/JWT/Create+a+story+for+each+component+in+an+epic).

Cheers
Thorsten

1 vote
Answer accepted
Thomas Hardin November 11, 2019

Will the issues be created in separate projects or will there be a need to change the details of the issues? I ask because if this is the case, then as @Jack Brickey mentioned, an Automation add-on that is more easily accessible would be the right choice. If not, then most of the workflow add-ons do work nicely as they can be configured to create the issues with certain fields populated (as you dictate). I created a use case similar to this a while back using JMWE where I used a multi-select drop down field to identify the different types of issues I wanted to have created, but it gave the user the ability to select the ones needed. This way, you didn't have to create everything unless absolutely needed. Within the workflow, I simply used post functions with conditions to create each of the issues in their respective projects. This wasn't too terribly difficult, but required a bit of discipline due to the number of post functions. I would mess a field up and have to go back and fix while I was testing, however; after it was complete, it worked quite nicely. For me, working with the standard functionality of the add-on, was the best bet as I am not a super scripter. However, if you have the background, your options are plentiful as @Jack Brickey mentioned earlier. 

 

I think the main question for you is....How do you want to maintain it? Do you want to be able to update via project or the workflow? From there, the sky's the limit. I hope this helped.

Shikher Kumar November 12, 2019

Hi @Thomas Hardin  - Thanks for your response, in my setup I have a cascading field in which first field is of 'Grade' and second for number of resource (1-10). So if a user has selected grade A and 5 resources, how will Jira create automatically 5 tickets copying all the information from parent ticket (ticket where they selected resource).

Everything will remain in same project.

Thanks

Shikher

Thomas Hardin November 12, 2019

Are all 5 tickets the same? You have to set conditions for each scenario within the post function. So, you may have multiple post functions, each with a condition for the specific scenario.

So, for JMWE, you can use the Create / clone issue(s) option.

Create Clone.jpg

Example: If Field A = Grade A and 5, then there should be a post function that is looking for that criteria. If that criteria is met, then that post function will execute. In your case, you need to use the Condition execution option to test the cascading field. 

Condition execution.jpg

Use the Issue fields option to find your field, then try testing it once you have it configured. This will support your criteria (Grade A, 5). From there, you can then set the fields to copy over. Issue Fields.jpgThis should be straight forward.

 

Then, use the Multiple Issue Creation option for the 5 issues. 

Mulitple Issue.jpgThe order here is not the same as in the post function, but I think you will want to work on the condition piece first to confirm the criteria. Additionally, this is only a recommendation. I'm sure your use case is a bit more complex than what I'm describing, so use my suggestions as suggestions only. You will find a number of options will work just as well. This seemed straight forward and very intuitive for me.

 

Hope this helps.

0 votes
Kamil Beer Vodafone November 11, 2019

You should be able to use JWT (Jira workflow toolbox) to create a custom post function that would create subtasks upon creation of the issue.

Kamil Beer Vodafone November 11, 2019

But it's much easier in JMWE or as Jack have mentioned, in Automation for Jira.

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 11, 2019

I would recommend looking at an addon: Automation for Jira, Scriptrunner, Powerscripts, etc.

Suggest an answer

Log in or Sign up to answer