This solution asks the users to propose an incident as a Major Incident candidate. The process is initiated from the Incident form when the priority is set to 1 (Critical), and the system checks if the incident has already been proposed as a Major Incident. If not, the user is prompted to confirm whether they wish to propose the incident. Upon confirmation, the incident is updated, and the Major Incident status is assigned.
This solution consists of a Client Script and a Script Include, which handle the user interaction and the back-end logic, respectively.
The Client Script is triggered when the user submits an Incident form with a priority of 1 (Critical). It performs the following actions:
- Checks if the incident is already marked as a Major Incident by calling the Script Include via GlideAjax.
- If the incident is not already marked as a Major Incident, the user is prompted to confirm whether they wish to propose it as a Major Incident.
- Upon confirmation, the incident is proposed as a Major Incident candidate, and a success message is displayed with the incident number.
- Priority Check: The script only runs when the priority is set to 1 (Critical).
- GlideAjax Call: Uses GlideAjax to communicate with the server-side Script Include to check and propose the Major Incident.
- User Confirmation: The user is prompted to confirm the proposal of the Major Incident before proceeding.
- Synchronous Execution: The script waits for a response from the server using
getXMLWait()
to ensure the process completes before submitting the form.
The Script Include provides the back-end logic for:
- Checking whether the incident is already proposed as a Major Incident.
- Proposing the incident as a Major Incident by updating its
major_incident_state
,proposed_by
, andproposed_on
fields, and adding work notes.
- When the priority of an incident is set to 1 (Critical), the client script checks whether the incident is already a Major Incident.
- If not, the user is prompted to confirm the Major Incident proposal.
- Upon confirmation, the
CreateMajorIncident
Script Include updates the incident record to reflect its proposed Major Incident status and returns the incident number.
You can easily customize this functionality by:
- Adding more validation rules to the Script Include.
- Modifying the client script to handle different priorities or additional fields.
- Updating the work notes or other fields when proposing the incident.