Visual ticked updated indicator using field styles

Not applicable

Something I had been asked for is some sort of visual indication if a ticket has been updated by anyone other than the person it's assigned to. Right now we flip incidents that the end user replies to into Active state if it's in Resolved or Awaiting and they reply to the email or update through self service, but itil users have still been asking for this quick visual indicator so they can see if a ticket that's already active has been updated, or if an itil user other than them makes an update.

I had done something sort of similar with showing a VIP icon in front of the caller's name in list view if they were a VIP, so I came up with a way to use field styles to add a blue dot in front of the incident number if it has been updated by anyone other than the person it's assigned to. To do this, I made two field styles, both against incident.number and using a javascript condition value.

The first one puts the blue dot there:

Value:
javascript:(current.assigned_to.user_name==gs.getUserName()&&current.assigned_to.user_name !=current.sys_updated_by)&&current.incident_state < 7

Style:
background-image: url('images/icons/bullet.gif');
background-repeat: no-repeat;
background-position:2 2;
text-indent: 15px;

The second one just indents the incident number, so all the numbers still line up in list view:

Value:
javascript:!(current.assigned_to.user_name==gs.getUserName()&&current.assigned_to.user_name !=current.sys_updated_by)&&current.incident_state < 7

Style:
text-indent: 15px;

The result is in the screenshot I attached.

I'm not sure if I'm going to actually implement this in our production instance or not, but I thought I'd share and ask if anyone has done something similar.

8 REPLIES 8

Not applicable

Oops... had a logic mistake I pasted in the second value. Fixed below. This is so all closed incidents are indented so they line up right.


Adam Raymond



Not applicable

Thanks for posting this, it seems pretty useful for the tech's to be able to quickly identify what they need to take a look at when glancing at their own queues.


CapaJC
ServiceNow Employee
ServiceNow Employee

Very cool and useful. One caveat I'll mention is that you might run into a problem if the records with the background image style are in a related list, and the viewing user is viewing the form using tabs in IE. In this event, I believe IE will throw an alert asking the user if they want to view unsecure content (or something like that). From what I've heard, this is not a problem that is likely to be fixed soon, and it's why Service-now.com backed away from using a "VIP" background image icon for the Caller field in the Incident list in the Best Practices - Incident Resolution Workflow plugin.


ptr1
Kilo Contributor

This is great and get's me close to what I need.

The only addition I need is to take this up to the level of Groups.

So the the logic is something like this...

The user is in a specific named group (Help Desk)
The incident.updated_by is not in the named group

This get's me the list of groups
getMyGroups()

Is there a function to get groups of the assigned_to or the updated_by?