- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
3 weeks ago
In Agile development within ServiceNow, visibility is key. Our team uses Agile Development and the Agile Board to manage and prioritise work - but manually keeping labels in sync with the story status became a hassle.
To solve this I found this ServiceNow KB: Visual Task Board: a business rule can update the card by adding a label when task is updated - Supp...
Which talked through building a Business Rule that automatically updates labels on VTB cards based on key field values like Priority, Blocked and State.
How It Works:
A business rule that runs on the story table for any creations or updates
This then looks up the related VTB Cards & the values on the story record
Then adds/Removes the corresponding labels that are stored in the label_entry field
What I did differently from the KB:
Created system properties to hold the sys_ids of the labels that I wanted to reference so they were not hard coded, and created a loop to update for each one.
Here is a code snippet to show this for high priority stories:
if (current.priority == 1 && !highPriorityTag.next()) {
highPriorityTag = new GlideRecord('label_entry');
highPriorityTag.label = highPriorityLabelSysId;
highPriorityTag.table = 'vtb_card';
highPriorityTag.read = 'yes';
highPriorityTag.title = "High Priority Tag for " + gr.task.number;
highPriorityTag.table_key = gr.sys_id;
highPriorityTag.insert();
} else if (current.priority != 1 && highPriorityTag.next()) {
highPriorityTag.deleteRecord();
}
Results:
After deploying this:
-
The Agile board became a real-time status dashboard
-
Product owners and BA's could immediately identify blocked or test-ready stories
-
Developers had less admin work keeping cards in sync
