Hi everyone, I have a task where I need to set up a mapping between a custom field and different projects. I have a custom field called “Department”, which can have around 20 different values. Depending on the selected value, I want to automatically clone (or create) the issue in another project. For example: If “Department” = IT, then the issue should be created in the IT project. If “Department” = Finance, then it should go to the FIN project, and so on. I know this can be done with multiple If / Else blocks in Automation, but I’m wondering — is there a cleaner or more elegant way to handle this kind of mapping in Jira Cloud? Thanks in advance!
Hello @Kirill Ananskikh
If we focus on the actions, I suggest you use the lookup table action.
That way, if you have new projects, you only need to update the reference table.
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-lookup-table
For example, we have a "department" field containing department values. (IT, Finance ....)
You create a lookup table named ProjectRef with the mapping key = department value, and value = project key.
So when cloning the ticket, for the "space" field, use the smart value {{ProjectRef.get(issue.department.value)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.