I need to create the same ticket in multiple projects and I'd prefer not to create a discrete Create Issue action for each project.
Ideally I could query on project details, something like:
for each project where project.category == "Feature Team":
create issue
If that doesn't work using JQL or a filter:
for each project in (ABC, DEF, EBC):
create issue
Pretty much anything except:
create issue in ABC
create issue in DEF
create issue in EBC
Any ideas?
Cheers,
Shawn
Hi @Shawn Oster
What version of Jira are you using? If it is Jira Cloud...
You could try creating a variable with the list of projects' id values, separated by commas, and then use an advanced branch to loop over those. In the issue create action, use the branch variable as the project key.
I have not tried this, so I do not know if the issue will successfully create with a lop variable as the project key.
Kind regards,
Bill
UPDATE: I changed the CSV list of project names to use the projects' id values and the rule worked as expected.
Hey Bill, that was a great suggestion but unfortunately you can't use smart values as inputs to the project list, as you suspected.
Give the number of projects (30+) I think I'm going with a quarterly CSV import.
Thanks again for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I should have tested first: this only works if the list in the variable is the project id values. I will update my earlier post :^)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill, you are my hero!
For future generations, you *can* use either project ID or key, depending on how you set your "More Options".
{
"fields": { "project": { "key": "{{projectKey}}" } }
}
I was getting stuck trying to set the project in the UI somehow, which obviously doesn't support smart values.
I dearly wish I could write actual code, and I was sorely tempted to write a lambda instead that used the REST API, but this approach allows me to hand off maintenance to our product folk instead.
Thanks again for your help, saved me a ton of time!
Cheers,
Shawn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well done!
I was using the dropdown field to set the project and did not try using the JSON edit for fields already shown in the Create Issue action, such as project and type. I suspect this technique would also support creating with the one-off issue types and status values in team-managed projects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.