Originally asked by Jacob Pines on 29 May 2023 (original question)
Hi,
We are connected from our Jira using Exalate to another remote location also using Jira, both Cloud.
The remote location has and uses a lot more Priority options while we only use 4. So when we get 1 that we do not have it receives the Default Value for the field.
I wanted to know if and how I can map the Values we get from Remote to the ones we use locally.
This is needed just 1 way, since what we use does exist on Remote so no need for mapping.
I tried to use a few of the existing questions/topics here with similar request, but did not find one that matches this scenario.
Priorities:
(Local <---- Remote)
- Blocker <---- Blocker
- High <---- High, Critical
- Medium <---- Medium, Major
- Low <---- Low, Minor, Trival
Let me know if you need additional information to assist.
Thanks in advance.
Comments:
Kaleigh Garcia commented on 21 February 2024
Jacob Pines I’m attempting to do the same, but it’s not mapping as expected… Did you solve this with Kevin Yorston 's solution? My code is below… Not sure if I’m missing something…?
// Set Priority based on replica.Priority__c
def priorityMapping = [
“1”: “P0 - Critical / Widespread”,
“2”: “P1 - Critical / Contained”,
“3”: “P2 - Noncritical / Widespread”,
“4”: “P3 - Noncritical / Contained”,
]
def priorityName \= priorityMapping\[replica.Priority\_\_c?.name] ?: "Unprioritized" // set default priority in case priority isn't found
issue.priority \= nodeHelper.getPriority(priorityName)