Skip to main content
Example scripts
arrow icon
To homepage
Jira Service Desk
Data centre icon
Data Center

Change Description Label Based on Priority

Features
Behaviours
Created 1 year ago, Updated 3 month(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
Jira Service Desk (3.10 - 4.6)
compatibility bullet
ScriptRunner For Jira (5.6.14)
Language |
groovy
import com.onresolve.jira.groovy.user.FieldBehaviours
import com.atlassian.jira.issue.priority.Priority
import groovy.transform.BaseScript

@BaseScript FieldBehaviours fieldBehaviours

if ((getFieldById(fieldChanged).value as Priority)?.name == 'Highest') {
    getFieldById('description')
        .setLabel('Why do you need this and why so important?')
        .setDescription('Please explain why this is Highest priority including details of outage etc.')
} else {
    getFieldById('description')
        .setLabel('Why do you need this?')
        .setDescription('Tell us why you want this.')
}
Having an issue with this script?
Report it here