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.
Code Block |
---|
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
Code Block |
---|
{
"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}}"
}
} |