How to allow edits to the incident priority field?

gregcurtis
Tera Contributor

We currently have the priority field on our incident form (instead of impact & urgency) and would like the same setup in the mobile app.

I have been able to configure the 'Create incident' action item to allow an incident to be created with the priority field, but when configuring the 'Edit incident' action item the priority field isn't an available option in the 'set field values' list.

Can someone provide some guidance on how I would allow ITSM agents to update the priority? Do I need to write a script for this?

Thanks,
Greg

2 REPLIES 2

PaulSylo
Tera Sage
Tera Sage

I think, you can see this field in Edit incident Action item, as you know this,

"By default, the Priority field is read-only and must be set by selecting the Impact and Urgency values. To change how priority is calculated, administrators can either alter the priority lookup rules or disable the Priority is managed by Data Lookup - set as read-only UI policy and create their own business logic."

so, this field will not be available directly to your edit. you need to disable this above UI and need to try

2. another option is to write a script.

Regards,
PaulSylo

Kindly mark "helpful", if this helps, or Mark as "Accepted " if it solves your issues !

Thanks Paul,

The web client form was updated to only show the Priority field when ServiceNow was implemented in 2016 (see below), the issue is to make the Mobile Agent app behave in the same way.

find_real_file.png

When creating an Action Item with the type as "update", priority isn't an option to choose in the set field values drop-downs

find_real_file.png

I did create an Action Item using a script to create an incident, but I'm not sure how to modify the script to make it work for updates so the current values are presented to the fulfiller when updating. This is the script I used there:

(function WriteBackAction(input) {
    //Type appropriate comment here, and begin script below
	var gr = new GlideRecord('incident');
	gr.initialize();
	gr.setValue("caller_id", input.caller_id);
	gr.setValue('priority', input.priority);
	gr.setValue('short_description', input.short_description);
	gr.setValue("description", input.description);
	gr.setValue("assignment_group", input.assignment_group);
	gr.setValue("assigned_to", input.assigned_to);
	gr.setValue("category", input.category);
	gr.setValue("subcategory", input.subcategory);

	if (gr.insert()) {
		gs.addInfoMessage(gs.getMessage('Success! {0} created', gr.getValue("number")));
	} else {
		gs.addErrorMessage(gs.getMessage('Failure! Incident  creation failed.'));
	}
})(input);