- 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-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-02-2025 10:36 AM
Hi @Robert H , thanks for your return!!!
Robert H: The default behavior is that if an Incident is in the Resolved state, users in the "Opened by" and "Caller" fields can reopen it, regardless of whether they have a role or not.
Elton: I created this user called "Enzo", he has an ITIL role, he can open the INC using the ESC Portal (img_01), but when the Resolver Agent in the Backend "Resolves" the INC, the "Reopen" option does not appear for the Enzo User via Portal (img_02), remembering that the Enzo user has an ITIL Role.
Caller (caller_id): Enzo (img_03)
Opened by: Enzo (img_03)
- In this case, I would like any user with an ITIL Role to have the option to "Reopen" when the INC is in the "Resolved" state.
In a real situation, any user with the ITIL Role will be able to reopen an INC with Resolved status.
Note: When I remove the ITIL role from the user Enzo, the option to "Reopen" appears in the Portal. (img_05)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 11:15 AM - edited 04-02-2025 12:53 PM
Hello @Elton2 ,
That's a very interesting case.
I have followed the same steps as you in my uncustomized Personal Developer Instance. I even named the user Enzo. And, as predicted, the user can see the "Reopen" button on his Resolved Incident, even when he has the "itil" role.
The most probable reason why it's behaving differently on your end is: either your Employee Center is already using a customized version of the "Incident Standard Ticket Actions" widget, or one of the Script Includes I mentioned earlier has been customized.
Maybe we can try some initial debugging steps. While impersonated as Enzo (with the "itil" role), go to the Incident view in Employee Center.
Open your browser's JavaScript console. How to do that depends on the type of browser but usually it's the F12 key.
Now hold the CTRL key and right-click on the Actions button, then select "Log to Console: $scope", as shown below.
The contents of the $scope object should now be logged to the console. Click the small arrow to expand it, as well as the following child objects: data => actionWidget => data. It should now look like in my first screen shot.
You should see the "canReopen" attribute and its value there. Is it true or false?
Next, check the value of "sys_id", also highlighted in my first screen shot. Is it "9bd06ce173070010cbb654eb7df6a7d4"? If so then you are using the OOTB widget, else you use a customized copy.
If you see the above sys_id, but "canReopen" set to false please check if the "IncidentUtils" or "IncidentUtilsSNC" Script Includes were modified by someone.
Lastly, create a temporary Business Rule (in a non-production instance)
- Table: Incident
- Advanced: checked
- When: display
- Script:
gs.addInfoMessage('Can reopen: ' + new global.IncidentUtils().canReopenIncident(current));
Then impersonate Enzo and open the Incident in the platform UI (not Employee Center). Does the message say Can reopen: true or false?
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 12:57 PM
Hi @Robert H , thanks again!!!
Yes! As you suggested I debugged it here in my PDI:
Robert H: You should see the "canReopen" attribute and its value there. Is it true or false?
Elton: It's "False" (img_001)
Robert H:
Next, check the value of "sys_id", also highlighted in my first screenshot. Is it "9bd06ce173070010cbb654eb7df6a7d4"? If so, then you are using the OOTB widget, if not you are using a custom copy.
Elton: Yes! The sysId is the same "v9bd06ce173070010cbb654eb7df6a7d4" (In this case, I am using my PDI)
Note: However, in the client instance (there is nothing custom), it is giving this same error.