Hey! My goal is to update the summary by adding a word "Important" at the beginning of the summary if the selected priority is "High". I am doing this with ScriptRunner by creating a behaviour. I create a mapping for the behaviour with choosing all "issue types". I did not add any field and just add a initialiser scpt. Please see the script below. It has no error but it is failing to update the summary when I set the priority to High when creating issue.
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
def priorityField = getFieldById("priority")
def summaryField = getFieldById("summary")
log.debug(priorityField.getValue()?.toString())
// Check if the chosen priority is "High"
if (priorityField.getValue()?.toString() == "High") {
def summaryValue = summaryField.getValue() as String
log.debug(summaryValue)
// Add "Urgency: " prefix to the summary
def updatedSummary = "Urgency: $summaryValue"
summaryField.setFormValue(updatedSummary)
} else {
// Show a warning message if the priority is not "High"
UserMessageUtil.warning("This behavior only applies when Priority is set to High.")
}