User Tools

Site Tools


behaviours

This is an old revision of the document!


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.1595344121.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki