One of the simplest things to do with Jelly is to create a formatter. This provides a mechanism to include a UI Macro in a form. Navigate to System UI > Formatters to see the out-of-the-box items. There are several examples, including the process flow formatter, the activity log, and the variable editor placed on the ITSM tables, that show what is possible.
Let's cover a simple but useful example. This will run on the Maintenance form, making it more obvious when an SLA has been breached:
- Navigate to System UI > UI Macros, click on New, fill out the form as follows, and Save:
- Name: check_breached_sla
- XML: (Insert inside the provided template, on line 3)
<j2:if test="$[!current.isNewRecord()]"> <g2:evaluate> var gr = ...