Highlight Incident if comments updated by Requestor

Lakshmi Prabha
Giga Expert

Hi,

Customer wants ServiceNow to Highlight the Incident in list view if the requester updates any comments in the Incident. Currently whenever any comment made by the requester will trigger an email to the Assignee. But they want ServiceNow to highlight the incident in homepage if there any comments made by the Requester so it grabs their attention to the corresponding Incident.

Is there a way to achieve this? Anyone implemented such feature?

Regards,

Lakshmi Prabha Elangovan

7 REPLIES 7

oharel
Kilo Sage

You could use styles.


Go to the incident list, configure -> all -> styles


For example:


Table: Incident


Field: number --> this field will change its color


Value (the criteria): javascript: !current.assigned_to.nil() && (current.assigned_to.user_name!=current.sys_updated_by) && (current.sys_updated_by!='system')


Style (color, bold etc):


background-color:orange;


font-weight:bold;


find_real_file.png



Note: I have not implemented this in my homepage, but in the incident list. My guess is that it can be done in the homepage with the correct conflagration of the widget, but I have not tried it.


Harshi05
Tera Contributor

Hello Oharel.

i tried this scrpit, it working as you mentioned but , after the action is taken on the highlighted ticket, the colour still remains orange , how can i fix this issue ?

 

Thank you

Hi,

It depends on your script. If the script evaluates to false, the field should not be colored.

For example, I have this:

javascript: !current.assigned_to.nil() && (current.assigned_to.user_name!=current.sys_updated_by) && (current.sys_updated_by!='system')

When I update an incident that is not assigned to me, the incident is colored orange. When I assign it to me and update it, the color disappears from the list view.

 

Harshi05
Tera Contributor

okay, but my requirements is different, can you help me with this situation.

Tickets to be highlighted in Orange if there is an update from anyone in the ticket(not just from the caller of the ticket). once the action is taken on the ticket , the colour should disappear.

 

this was my existing code : javascript:current.caller_id.user_name==current.sys_updated_by&&current.sys_mod_count!=0&&current.active==true  - when the caller updates any worknotes , the incident number was changing to orange , and when the fullfiller takes an action , the colour disappares.

 

Thank you: