User Tools

Site Tools


behaviours

Behaviours

Update field's Label, Description and Help Text

This can be set under Behaviours' field mapping

def resDescField = getFieldByName("CustomFieldName")
resDescField.setLabel("Set Label Here")
resDescField.setDescription("Set Description Of The Field Here")
resDescField.setHelpText("Set RED Help Text Here")

Reference: ScriptRunner

Verify that assignee for the ticket is within the range of usernames

def ticketAssignee = getFieldById("assignee")
def ticketAssigneeValue = ticketAssignee.getValue()
 
if (!['', 'user1', 'user2'].contains(ticketAssigneeValue)){
    ticketAssigneeValue.setError("Sorry, you cannot assign to this user")
} else {
    ticketAssigneeValue.clearError()
}
behaviours.txt · Last modified: 2020/07/21 11:08 by root