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

JSM automation to raise multiple new tickets

Paul Cantle June 10, 2024

Hi all, I'm pretty new to JSM so looking for a bit of help if possible.

I've created a (user onboarding) form which (based on a drop down menu) changes the number of fields that are displayed. This is working fine.

What I wanted following the submission of the form was to trigger auto-creation of a number of subsequent tickets and that number would be based on the number of users in the onboarding form.

e.g. If a project owner requests that 5 new users are onboarded and fills out their details, upon submission, i'd like 5 additional (linked) tickets to be created (1 per user).  

Thus far, i've managed to have the automation create 1 linked "child" ticket, but it was purely based on submission of the "parent" not the data used within it.

Is there anyway, based on random fields (that are filled out with user details) that I can create automation to create the number of tickets based on the number of users required?

A bonus would be if I could assign those ticket to the respective (user1|user2|user3|user4|user5  email address fields.

Thanks!

1 answer

1 accepted

2 votes
Answer accepted
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2024

Hi @Paul Cantle , welcome to the Atlassian Community and thanks for your question!

I am doing something similar for an Onboarding request like this -

image.png

Basically, you can 'branch' on the attribute of which there are multiples. In my case, I was using a custom field from the request form, where I had asked, ok, the request is to onboard a new resource, what materials do they need? So, in my case, the custom field is a tick box, where they can indicate, this new person would need a computer, company phone, etc and using the branching, I can create a new subtask to track the delivery of all of the resources for the new person.

There are different options for how to branch. It might be that you don't need to create a smart value. Please check out the automation library too - https://www.atlassian.com/software/jira/automation-template-library#/rule-list?systemLabelId=all&page=1&pageSize=20&sortKey=name&sortOrder=ASC . I always recommend this as a resource for people who are learning automation as you can see lots of worked examples and use cases that other people have solved with automation.

If you get stuck or need help, please share your feedback and either I or someone else will try to give you a hand.

Cheers

Paul Cantle June 10, 2024

Hi @Valerie Knapp Thank you very much for this: Definitely looks like this will work for me. Sadly, I don't have perms to create custom attributes to be used in Smart Values, but I've asked the admin team to do it for me.

I'l report back once I've configured the rule.


Thanks again

 

Paul

Like # people like this
Paul Cantle June 20, 2024

Hi @Valerie Knapp So I've finally had some values created

Blah_user_1

Blah_user_2

...

Blah_User_5

However, I'm still unclear how I utilise them in the loop.

When I branch off and select "Advanced Branching", in the smart value, I presume I need to have something like {{issue.Blah_user_1}} and then a variable name of (for example) "email" and 

then:

Create issue -> of type "whatever".

Do I then add another branch for {{issue.Blah_user_2}} and repeat or is there a way to do it all with one branch (like a traditional "for loop")?

something like
Smart Value = {{issue.Blah_user_}}
Variable = 1, 2, 3, 4, 5

Type of thing?

Paul Cantle June 20, 2024

Hi, following on from this: I have it working as desired but need 5 branches for 5 users. If that's the correct way, great. If there's a way to do all this in one branch loop, I'd be really grateful for some help.

 

Cheers

Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 20, 2024

Hi @Paul Cantle , thanks for your feedback. If you need each of the 5 branches to do different things, I don't know that I can recommend any efficiencies. If you want, you can post an anonymised version of the rule that we can look at but if you've got something working, I'd take the win!

Cheers

Like Paul Cantle likes this
Paul Cantle June 20, 2024

Thanks very much for your help, it gave me exactly what I needed.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events