Remove dropdown selections from Action button for Incidents from Customer Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 08:55 AM
would like to not allow customers to reopen Closed Incidents from the Customer Portal
where can I go to remove 'reopen' selection from the action button for "Closed" Incidents?
We need to allow customers to reopen or close an Incident ticket in 'Resolved' status
BUT
Do NOT want the customer to be able to reopen an Incident ticket in 'Closed' status
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 09:24 AM
By default, that option is displayed only for resolved incidents, not for closed. In your case, there must be a customization that results in a different behavior. Let me explain what components this functionality consists of and then you should be able to find the cause of the issue. Here is what you need to know:
1. Actions dropdown is a separate widget. It is referenced in the Action widget field of the Ticket Configuration [ticket_configuration] entry for the Incident table.
2. In the Server script field of that widget, there is the following block of code that calls functions from the IncidentUtils script include to determine whether the corresponding option in the dropdown should be displayed or not:
if (incidentGr.get(incidentSysId) && hasPermissions(incidentGr, "read")) {
var incidentUtils = new global.IncidentUtils();
data.canResolve = incidentUtils.canResolveIncident(incidentGr);
data.canReopen = incidentUtils.canReopenIncident(incidentGr);
data.canClose = incidentUtils.canCloseIncident(incidentGr);
data.showActions = data.canResolve || data.canReopen || data.canClose;
}
3. IncidentUtils script include extends IncidentUtilsSNC script include and inherits all it methods. However, you can override them by redefining them directly inside IncidentUtils script include.
4. By default, the code of canReopenIncident function looks like this:
canReopenIncident: function(current) {
return current.incident_state == IncidentState.RESOLVED && !gs.getUser().hasRoles() && !this._isMajorIncident(current);
},
Note how it uses IncidentState.RESOLVED constant. IncidentState is another script include, which in its turn extends IncidentStateSNC script include. The out-of-the-box value for IncidentState.RESOLVED is "6".
In summary, there are a number of places where changes may have been made in your instance, preventing this functionality from working the way it should. You need to check them one by one to identify the root cause.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/