Is it possible to use script runner to create multiple project ?

I have a request about : We have a project called Red_Flag,

We have install a plugins Multi Project Picker(Because JIRA system only support single project select lists)

https://marketplace.atlassian.com/plugins/net.brokenbuild.multi-project-picker/server/overview

to let issue asignee to select which project they want to create.

For Example, If he choose A,B,C project,then jira automatically create(or clone) the same issue From Red_Flag project to A,B and C project.

I have already tried the following two methods:

#1 Use script runner script listener scripts:Clones an issue and links,but it only support single target project to cteate,it doesn't work.

 

#2 Use Create on Transition for JIRA plugins

https://marketplace.atlassian.com/plugins/org.swift.jira.cot/server/overview

create multiple issues function,but it doesn't work

 

JIRA Support, Pleas give me some suggestions,thank you!

 

6 answers

This widget could not be displayed.

Hi Yun,

This should definately be possible with script runner. The first thing I've noticed that you mentioned you attempted to use "Clones an issue, and links" build in script listener. Your problem with it was that it only allows a single target project. One possible solution is that you could use multiple listeners for each target project that you want to copy to. It does require a little bit of duplication, however it is nice and easy to manage and very easy to implement.

I hope this helps!

Steve

This widget could not be displayed.

One possible solution is that you could use multiple listeners for each target project that you want to copy to. It does require a little bit of duplication, however it is nice and easy to manage and very easy to implement.

 

Hi Support,

But we want to dynamic based on assignee to chose which project to create.Is it possible to support multiple project select lists?

We have already over sixty jira projects need to create.

This widget could not be displayed.

You will need to write a listener that gets the content of the multiple-project field and iterates over the content - I expect a "get custom field value" call to that field will return an array, with each element being a project.

This widget could not be displayed.

Hi Support,

Is it possible to add this function to original "Clones an issue, and links" listener that support "multiple project select lists" custom field ?

multiple project select lists custom field return value as following:

[Project: A, Project: B]

By the way,how to create a custom listener?

Could you give me some examples?

Thanks for your great support.

This widget could not be displayed.

Hi Yun,

To answer your first question, we could add a multiple project select for the clone issue and links listener, however this would need to be worked into our existing product development backlog, so wouldn't solve your issue today. You can make a feature request through the ScriptRunner support portal.

How to create a custom listener?

There are instructions on how to set this up in the Scriptrunner for Jira documentation (https://scriptrunner.adaptavist.com/latest/jira/listeners.html#_custom_listeners)

This site also contains some examples :-)

This widget could not be displayed.

Hi Support,

But my question is how to use groovy scripts to clone an issue based on multiple project select choose.

I am a begineer for groovy scripts and not familiar with it?

Could you please give me some direction or suggestions?

Or Provides some reference code?

Thank you.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

225 views 3 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you