- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2019 06:45 AM
I found a great post from @Laurent C. that talks about building a processor to dynamically build a Visual Task Board for team members.
A few questions that I was hoping someone that is more familiar with scripting would be able to help with
- Problem: Even if you adjust the filter to focus on certain sys_class_name or states, when you organize the field by those options you will see numerous empty lanes as the task table is full of sys_class_name and states.
- Question/Seeking Solution: Is there anyway to include in this processor script to either dynamically include only certain lanes (vtb_lane_list) or set the ordering or preferred lanes (such as incident order = -20)
- Problem: The processor allows for tasks, but if we wanted to set seperate dynamic VTB for change, incident, problem, and catalog task (versus one overall task one), it seems that this only allows logic of one dynamic VTB even if you have a differet dynamic link
- Question / Seeking Solution: Is there a way to adjust the processor code so we could have seperate processors for specific task type and ultimately different paths that we could create an application link
Thanks!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 11:13 AM
Hi Eric,
Hope you are doing well.
Is your question resolved? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Willem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 07:03 AM
- dynamically include only certain lanes
If you want for example State to be the lanes and show all task types, each task type needs to be moved to a different lane. At least for the statuses that are not shared among all. The Processor script for that reason only creates lanes "To Do", "Doing" and "Done". You can change the lanes, but not sure it will be a usable board. - separate processors for specific task type
This can be done by adjusting the Processor and create one for each task type. It will set a user preference for that specific board. It will look like this:
(function process(g_request, g_response, g_processor) {
//configuration per task type:
var taskTable = "incident"
var vtbId = gs.getPreference('vtb.assigned.to.me' + taskTable);
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 = taskTable;
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' + taskTable, vtbId);
}
g_processor.redirect('$vtb.do?sysparm_board=' + vtbId);
})(g_request, g_response, g_processor);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 11:13 AM
Hi Eric,
Hope you are doing well.
Is your question resolved? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Willem