How to map jira field with icons

Originally asked by Chama on 01 June 2022 (original question)


Hi, I am trying to map ADO Priority values to Jira Cloud Priority values as below.

def priorityMapping = [
“1”:“Escalate”,
“2”:“High”,
“3”:“Medium”,
“4”:“Low”
]
def remotePriorityName = replica.customKeys?.“Priority”
def localPriority = priorityMapping[remotePriorityName]

issue.Priority = localPriority

1,2, 3 and 4 are the values from ADO. However, this doesnt work as the Jira Cloud has icons together with each text value for priority as below.

Can someone please help how to fix this?

Many thanks


Answer by Jillani Fazal on 02 June 2022

Thank you for elaborating the scenario and would suggest you check this document, which will be helpful: https://docs.idalko.com/exalate/display/ED/getPriority


Answer by Jillani Fazal on 01 June 2022

Hi Chama,

May I know if the priorities are not syncing at all? Would it also be possible for you to elaborate the scenario a bit more, please?


Comments:

Chama commented on 02 June 2022

Hi Jillani,

I have 4 possible values for Priority on ADO side (1, 2, 3, 4) which I need to map to 4 different values in Jira (High, Escalate, Medium, Low). Added is the current code I have in place which is not working. I believe the issue is, Jira values exist with those little icons, so mapping might not be accurate as they are not purely text. Hope this makes sense.

Regards