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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,136
Community Members
 
Community Events
184
Community Groups

How to use groovy scripts to clone an issue based on multiple project select choose

Hi Support,

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.

2 answers

Hi Support,

This Clones an issue,and links function only support traget single project created,But I want to choose multiple project to create,do you have any suggestions about it?

 

Thank You.

0 votes
Joshua Yamdogo _ Adaptavist
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.
Sep 11, 2017 • edited

Hi Yun,

Could you provide more details as to what you are trying to accomplish?

Let me see if I understand correctly:

  1. You have a custom field of type "Multi-select" list
  2. Users can select types of "Projects" from the Multi-select list
  3. If they select certain projects, you want to clone the issue 

You could accomplish this using a Script post-function. For example, you could add a post-function on the "Create" transition of the workflow.

ScriptRunner already has a built-in function to clone an issue:

Screen Shot 2017-09-11 at 3.21.42 PM.png

You could use a condition like this to check what values are selected in the custom field:

('Project1' in cfValues['Project List']*.value) && ('Project2' in cfValues['Project List']*.value) && ('Project3' in cfValues['Project List']*.value) 

 

Hi Support,

This Clones an issue,and links function only support traget single project created,But I want to choose multiple project to create,do you have any suggestions about it?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events