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?
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"
}
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.
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.