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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to clone issue to different project based on custom field value

Hi,

I want to clone issues to different project based on Custom filed value.

For example if custom field value is A, then it should be cloned to Project A and if custom field value is B, then it should be cloned to Project B.

I am using "Create / Clone Issue(s) Post-function" by JMWE where i need to chose specific project to choose for cloning. Instead is there a way to chose project based on condition of custom field value?

Based on custom field value, i need to clone to different projects(5 or more). Is there a way to chose project to clone based on condition?

2 answers

I have a very similar use-case (we use an "Escalation Team" field to identify which team should be owning an incident), and the way we worked around this issue was to:

1) Include the project key of the destination in the custom field options. As example our team "Optimus Prime" uses the JIRA project with the key "PRIME" so their value in the field is "Optimus Prime (PRIME)".

2) We use Automation as opposed to JMWE for this, but when the logic is triggered it uses string parsing to pull out the project key for use ("PRIME").

This approach saves us a lot of maintenance, since adding a new team or destination is as easy as adding a new value.

0 votes

Hi Tamil,

you can simply choose "Calculated:" as the destination project, and then provide a Groovy script that returns a project key based on the value of the custom field, such as:

switch (issue.getAsString("custom field")) {
case "A": return "PROJA"
 case "B": return "PROJB"
}

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,047 views 8 28
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you