/
Mapping of priority

Mapping of priority

To map priority to other systems prio use a groovy variable.

In this case we will send 1-kristisk when High is used to BC Jira.


def prio = ""
switch(issue.priority.name){
  case "High":
    prio = "1-kritisk"
    break;
  case "Medium":
    prio = "2-medium"
    break;
  default:
    prio = "Low"
    break;
  
}
return prio



Access the variable in your Action body

{
    "fields": {
        "project": {
            "id": "10100"
        },
        "summary": "{{issue.summary}}",
        "issuetype": {
            "id": "10001"
        },
        "priority":{
            "name":"{{BC_PRIO}}"
        },
        "labels": [
            "from_testsup"
        ],
        "description": "{{issue.description}}",
        "customfield_10600": "{{issue.customfield_10703}}",
        "customfield_10201": "{{issue.key}}"
    }
}



Related content

JSON Path variables
JSON Path variables
Read with this
Create Zendesk ticket from Jira Issue
Create Zendesk ticket from Jira Issue
More like this
Groovy get custom field value
Groovy get custom field value
Read with this
How to create an issue with insight data
How to create an issue with insight data
More like this
Variables
Read with this
Create a user and find a user
Create a user and find a user
More like this