- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 02:30 PM
ServiceNow Friends,
We have been able to create task boards on an individual basis. We'd like to have a visual task board exist in the application menu and display results dynamically based on "assigned to". We can create the board we need, but don't want to create individually for each user.
Thanks,
Jeremy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2017 11:49 AM
Hi Jeremy,
This is a nice idea.
Here is how to do it (I made it in Istanbul so not sure about the compatibility with older versions, differences should only be in the creation of the task board):
1. Create a processor that will create the board if the user does not already have a visual task board for his tasks or if the user already has a board then we will redirect him to that board. The board sys_id will be stored as a user preference of the user.
Name: VTBTasksAssignedToMe
Type: script
Path: vtb_tasks_assigned_to_me
Script:
(function process(g_request, g_response, g_processor) {
var vtbId = gs.getPreference('vtb.assigned.to.me');
var vtbGr = new GlideRecord('vtb_board');
if(!vtbId || !vtbGr.get(vtbId)){
vtbGr = new GlideRecord('vtb_board');
vtbGr.initialize();
vtbGr.name = gs.getMessage('Tasks assigned to me');
vtbGr.owner = gs.getUserID();
vtbGr.table = 'task';
vtbGr.filter = 'assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe';
vtbGr.field = '__KANBAN__';
vtbGr.card_limit = 1000;
vtbGr.stream_limit = 50;
vtbGr.show_list_toggle = true;
vtbGr.background_color = 'vtb-board-color-1';
vtbId = vtbGr.insert();
//If using field kanban which is the default lanes we must create these lanes
if(vtbGr.field == '__KANBAN__'){
var lanes = [gs.getMessage('To Do'), gs.getMessage('Doing'), gs.getMessage('Done')];
lanes.forEach(function(lane, index){
var laneGr = new GlideRecord('vtb_lane');
laneGr.initialize();
laneGr.board = vtbId;
laneGr.name = lane;
laneGr.order = index;
laneGr.insert();
});
}
//Setting the user prefrence
gs.getUser().setPreference('vtb.assigned.to.me', vtbId);
}
g_processor.redirect('$vtb.do?sysparm_board=' + vtbId);
})(g_request, g_response, g_processor);
You can customize the script to change the default values. The filter is an encoded query, you might want to modify it, let's say to add "^active=true".
If you have different needs for that type of Visual Task board generated from a menu you might want to make this processor more scalable by adding parameters. I made it quickly to show the functionality.
2. Create a module to make this processor run
Title: Visual Task Board - Assigned to me (you can give another title if you want)
Application Menu: Choose what you want
Link type: URL (from Arguments:)
Arguments: vtb_tasks_assigned_to_me.do
Roles: If you want to limit the use to a specific role (ex: itil)
3. Create ACL for that processor (Only if you chose to limit the use to the specific role)
Type: processor
Name: VTBTasksAssignedToMe
Requires role: Role(s) you selected for the module
I hope this helps you, don't hesitate if you have any question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 06:07 AM
Little warning, look at my edit as the Parameters field was causing bugs in Jakarta by causing other processors to fail. HI helped me a lot on this one, I would not have expected such a dependency between processors.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2017 04:18 AM
Hi Laurent,
It's a brilliant idea to create custom VTB. I also tried to use this method, I have tried to edit the code according to my requirement but I haven't achieved. In my requirement, I have to present the OOB functionality of "Story Progress Board" under agile development 2.0 . Could you please me in the best method to create a data driven VTB. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2017 09:30 AM
Hi Remala,
I don't get how the "Story Progress Board" relates to the VTB for you. ServiceNow developped the Story Progress Board as something different from the Visual Task Board. What are you trying to achieve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 10:22 AM
Laurent,
We adopted your original proposed solution (with modifications for our process) and it was working flawlessly. We build our board lanes off of a custom field (a state field which we limit to 4 values).
Upon upgrading to Jakarta, we can no longer drag cards between lanes and get an error that the lane value is invalid for the field type. The field type for our lane is a simple string. If we configure "dictionary choices" for our custom field which match the lane values, we can then drag cards between lanes and the field updates. However, as soon as we configure dictionary choices for the field the task board ends up duplicating all of the lanes, one with the "values" of our custom field ex:Work In Progress, and one with what looks to be a comma separated list of tablename:value from the dictionary entries ex: "change_request:Work In Progress,Incident:Work In Progress".
In testing various scenarios It almost seems like the Visual Task Board can no longer work with a Custom field.
Any thoughts or ideas?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 12:51 PM
Hi Tom,
I was able to reproduce the issue when adding choices without setting the choice list specification to "Dropdown with none" or "Dropdown without none". As soon as I set the choice list specification everything works as expected. Is it your case? (simply created choices without setting the choice list specification on the dictionary record)
If it is not that, did you try to delete the lanes? (going on vtb_board.list in the navigator and open the boards to try to delete the lanes). If this work and you need help to have a cleanup script, I can help you out with a fix script.