- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 07:36 AM
Hy everyone, how are you?!
When the user opens an INC using the Employee Center Portal and when this INC is "Resolved" by the Resolving Agent in the Backend, there should be a "Reopen" option in the Portal (img1_option_reopen).
However, I looked at some information here in the Community and this "Reopen" option will only appear
if the user DOES NOT have any role, I tested it and this does indeed happen (img2_user_without_role).
They even suggested commenting out line 41 of the "incident-standard-ticket-actions" Widget (img3_line_41), but
I can't do that, because we need to use everything OOTB.
I would like to know if there is any other way to enable this "Reopen" option for all users (or only ITIL)? Using OOTB?
Thank you very much! 😉
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 08:55 AM
Hello @Elton2 ,
The default behavior is that, if an Incident is in the Resolved state, then the users in the "Opened by" and "Caller" fields will be able to Reopen it, no matter if they have a role or not.
Here is the code that is being called in line #41 of the "Incident Standard Ticket Actions" widget (it can be found in the "IncidentUtilsSNC" Script Include):
So isn't the default behavior exactly what you want? Or do you want to make the "Reopen" button available to "all users" (as stated in the title of your post), meaning any user could Reopen any other user's Incidents?
In any case, you achieve whatever requirement you have without cloning this widget. All you would need to do is to override the "canReopenIncident()" method, by putting a method with the same name in the "IncidentUtils" Script Include (not the one mentioned above ending with SNC).
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 04:46 AM
Hi @Robert H , good morning! 😉
Robert H: If you see the sys_id above but "canReopen" set to false, check if the included scripts "IncidentUtils" or "IncidentUtilsSNC" have been modified by someone.
Elton: I checked the 2 Script Includes and both were not modified (img: IncidentUtils/SNC - Script Include)
Robert H: Lastly, create a temporary business rule (on a non-production instance)
Table: Incident
Advanced: checked
When: display
Script:
Elton: I created the BR (BR_Who Can Reopen Incident 1/2), but I impersonated "Enzo", but it does not show the message (message_1)
Thanks again!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 04:53 AM
Hello @Elton2 ,
Thanks for the updates.
As mentioned in my last post, the Business Rule needs to be checked by opening the Incident in the platform UI (not Employee Center).
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 10:59 PM
Hello @Elton2 ,
Thank you for going through the analysis steps. So we have confirmed you that you are still using the OOTB widget, but for some reason the method in the Script Include does not return the expected value.
Did you see the additional check I added to my last response an hour later ("Lastly, create a temporary Business Rule...")? Can you please check this as well?
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 04:41 PM
Hi @Robert H , how are you?!
Sorry for the delay!
I checked and this is the correct behavior (as you explained previously), the user with the ITIL role does not have access to the Portal, but rather through the Backend, so if we want it this way, it will be necessary to customize the script include (IncidentUtilsSNC).
Example:
canReopenIncident: function(current){
if (current.incident_state != incidentState.RESOLVED || this._isMajorIncident(current))
return false;
if (gs.hasRole("itil"))
return true;
if (current.caller_id == gs.getUserID() || current.opened_by == g.getUserID())
return true;
return false;
},
I'd like to thank you for your support and attention.
Thanks again and have a great day!!!
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 11:03 PM
I don't think without updating the OOTB component this can be achieved.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader