You can add a new change type to your change process. There are several processes
involved with adding a change type. These processes include managing script includes and
workflows.
Before you begin
Role required: admin
About this task
In addition to the three types of change available by default, you can add new change
types based on your organization requirements. For example, you can create a change
type Expedited for changes that you require to be processed
immediately.
Procedure
-
Complete the following steps to add a new choice to the
Type field.
-
Open an existing change request.
-
Right-click the Type field and select
Show Choice List.
-
Click New and fill in the following
fields.
| Field Name |
Description |
| Table |
Select the Change Request
table. |
| Label |
Enter a value for the new change type. For
example, Expedited. |
| Value |
Enter a value for the new change type. For
example, expedited. |
| Sequence |
Enter a sequence for the change type. For
example, 4. |
-
Submit the form.
-
Complete the following steps to add the new change type to the change request
interceptor.
-
Navigate to .
-
Open the Change Request interceptor.
-
Click New in the Answers
related list.
-
Complete the form, as appropriate.
| Field |
Description |
| Question |
Change Request |
| Name |
Enter a name for the new change type. For
example, Direct to Expedited
Change. |
| User Prompt |
Enter a description that is displayed to the end
user when they click Create
New under
Change. |
| Target URL |
Set the appropriate target URL. For example,
change_request.do?sys_id=-1&sysparm_query=type=expedited. |
| Order |
Set the appropriate order level for the change
type. For example,
400. |
-
Submit the form.
-
Complete the following steps to create the script include for the new change
type.
-
Navigate to .
-
Search for a change type script include on which to base the workflow for the new change type.
For example, to base it on Emergency change type, search for ChangeRequestStateModelSNC_emergency and open the script include.
-
Copy the script of the
ChangeRequestStateModelSNC_emergency script
include from the Script field.
-
Navigate to and click New.
-
Name the new script include to match the value of the new type.
For example, ChangeRequestStateModelCust_expedited.
-
Paste the copied script in the Script field of
the new script include.
-
Update any references in the pasted script include from
ChangeRequestStateModelSNC_emergency to
ChangeRequestStateModelCust_expedited.
-
Click Submit.
Note: An existing script include contains the implementation for all the
moving and canMove
functions. The moving function is used to
pre-populate any fields that are required for the new state. The
canMove function is used to check for any
additional requirements and to validate whether a task can move to
the next state.
-
Complete the following steps to create the script include to define state transitions and control the transitioning between states for the new change type.
-
Navigate to .
-
Search for change type script include on which to base the transitioning controls for the new change type on.
For example, to base it on Emergency change type, search for ChangeRequestStateModel_emergency and open the script include.
-
Update the name of the script include to match the value of the new type.
For example, ChangeRequestStateModel_expedited.
-
Update the reference to the base script include for the new change type as created in step 3.
Change the extended Object in line 2 to the base script include name. For example, ChangeRequestStateModelCust_expedited, so the reference is similar to the following string.
ChangeRequestStateModel_expedited.prototype = Object.extendsObject(ChangeRequestStateModelCust_expedited,
Ensure that the reference of the type is similar to the script include that is created. For example, type:"ChangeRequestStateModel_expedited"});. The type is present at the bottom of the
script.
-
Click Insert and Stay create a copy of the script include ChangeRequestStateModel_emergency with the new name ChangeRequestStateModel_expedited.
-
Complete the following steps to modify the script include that controls the transition between states using one of the defined models for the new change type.
-
Navigate to .
-
Search for and open the ChangeRequestStateHandler script include, which controls the transitioning between states using one of the defined models.
-
Create a property to reference the new change request type value.
For example, EXPEDITED:"expedited".
-
Override the base method _resetModel to be able to include the new model.
For example, if the change request type is expedited, then the new state model ChangeRequestStateModel_expedited is included. You must include the string
EXPEDITED:"expedited" after initialize: function(changeRequestGr) { as shown in the screen.
-
Save the script include.
-
Complete the following steps to create a workflow for the new change request
type.
-
Navigate to .
-
Open an existing change request workflow.
For example, Change Request – Emergency.
-
Select Copy from the Actions menu to copy the workflow and name the new workflow.
For example, Change Request - Expedited.
-
Select Properties from the Actions menu to update the condition under which the new workflow executes.
For example, [Type] [is] [Expedited] in the condition.
-
Open the matching change tasks workflow that is called by the main workflow.
For example, Change Request - Emergency change tasks.
-
Select Copy from the Actions menu to copy the workflow and name the new workflow.
For example, Change Request - Expedited change tasks.
-
Select Publish from the
Actions menu to publish the new change tasks
workflow and make it available for use.
-
Go back to the first workflow you created and update the Workflow activity to reference the new change tasks workflow.
For example, Change Request - Expedited change tasks.
-
Select Publish from the
Actions menu to publish the new workflow and
make it available for use.