Live Feed has a serious flaw compared to social networks like Yammer, and Facebook. You cannot currently use the @ symbol to “tag” someone. This update set is a first attempt at building this functionality into Dublin/Eureka.
Warnings
- The user search currently is not guaranteed to respect ACLs or domain separation.
- In order to implement this functionality, one key best practice was violated – DOM Manipulation. Service-Now as a rule should never be customized using JavaScript that uses html id’s, classes, and the like to be implemented. However, since the code to the live_feed is not customizable by users, JQuery was used to create the desired outcome.
Tested on
- Dublin + Google Chrome 32.0.1700.107
- Dublin + Firefox 27
Download Here
How It Works
From a User Perspective
- When using the Live Feed in the browser, a user can type “@” and then start typing a user’s first or last name.
- If the system finds some users, it displays them below the message box, and the user can click on one of the names to “tag” that user.
- Many users can be tagged in a single message.
- When a user is tagged, their user name will replace their name during message composition.
- Once submitted, the user’s name will once again replace the user name.
- Note: This switch, while confusing, is done to enforce unique tagging.
- If a user is tagged in a message, they will receive a notification with the message text and a link.
From a System Admin’s Perspective
- In the left hand navigation menu, there’s a hidden module called “Social Injection”.
- This item pulls in it’s own JQuery instance, and then uses that to monitor the primary frame and make the necessary modifications to the Live Feed.
- When the @ symbol occurs, AJAX queries are sent for every keypress, to look for users, until the query returns nothing – then it waits for a backspace event or another “@” symbol to start looking again.
- When a message is submitted, a before business rule handles swapping the user names back to the names and firing off an event, which triggers a notification.
Installation Instructions
- Import, Preview, and Commit the update set “2014-02-11 – Social Feed Enhancements v0.1- GG”.
Future Enhancements
- This functionality currently only works on the standard ITIL view with the left hand navigation showing.
- Would like to improve this to make it work from all views.
- Currently only works in the top message box.
- Would like to make this work in every reply box on the page.
- Test and certify in all Service-Now browsers.
- Test and certify on Berlin + Calgary.
Changes Involved
- Business Rules:
- “PeopleTagging”
- Contains the code to fire events/notifications after a user is tagged in a message.
- “PeopleTagging”
- Application Menu Modules:
- Social IT -> Social Injection (hidden)
- Contains the client side code to enable the tagging functionality.
- Social IT -> Social Injection (hidden)
- Script Includes:
- “PeopleTag”
- Contains the server-side AJAX code to perform a user search and return the results to the browser.
- “PeopleTag”
- Events
- live_message_peopletag
- Fired once for every user tagged in a message. Triggers the notification.
- live_message_peopletag
- Notifications
- Live Message – Person Tagged
- Sends out an email notification alerting a user that they’ve been tagged in a Live Feed message.
- Live Message – Person Tagged
Categories: Developers
Leave a Reply