Is it possible to bulk assign INC tickets to visual task board?

Community Alums
Not applicable

Is it possible to bulk assign INC to a visual task board all at once in SN or do they have to be done one by one?

Thanks,

Rajini

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

I believe you can check multiple in list view and then do a list action, at the bottom, and select add to Visual Task Board:

find_real_file.png


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hi,

I believe you can check multiple in list view and then do a list action, at the bottom, and select add to Visual Task Board:

find_real_file.png


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Community Alums
Not applicable

Wow, I dint think about this one. Thanks for your help though.

 

Rajini

brantgluth
Kilo Expert

I actually wrote up a script in a scheduled workflow to run at midnight every night for our internal SNow incidents. this gives us time to weed out the break/fix before they go to the board, while setting the longer duration tickets up as cards for scrumming. Not sure if  that'd be helpful

//based off info from https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/use/visual-task-boards/reference/r_TIWVisualTaskBoards.html
var snowBoardSysID = "****************f1abff961d9619d5"; //from vtb_board

var grSNowTasks = new GlideRecord("incident");
grSNowTasks.addEncodedQuery("active=true^cmdb_ciLIKEservicenow^stateIN1,5,-5");
grSNowTasks.query(); // Issue the query to the database to get relevant records
while (grSNowTasks.next()) {
// add code here to process the found record

gs.print(grSNowTasks.short_description);

addSnowIncidentstoVTB(snowBoardSysID, grSNowTasks);
}


function addSnowIncidentstoVTB(snowBoardToAddTo_SysID, taskObject){
//
var requestsLaneID;
var state = taskObject.state;
switch (state.toString()) {

case "1":
requestsLaneID = "****************f1abff961d96199e"; //requests from vtb_lane
taskObject.state = -5;
taskObject.u_substate = "Pending Resources";
taskObject.update();

break;
case "-5":
if (
taskObject.u_substate == "Pending User Info"
|| taskObject.u_substate == "Pending Change"
|| (taskObject.u_substate == "Pending Resources" && taskObject.parent_incident.nil())
){
requestsLaneID = "****************f1abff961d9619d7"; //assigned from vtb_lane
}

break;
case "2":
case "5":
requestsLaneID = "****************f1abff961d9619d7"; //assigned from vtb_lane
break;
case "6":
case "7":
requestsLaneID = "****************f1abff961d9619d8"; //resolved//closed from vtb_lane
break;
default:
requestsLaneID = "****************f1abff961d96199e"; //requests
break;
}
if(requestsLaneID){
gs.print("state: " + state + " lane " + requestsLaneID);

//check record exists
//gs.print("querying cards");
var grExists = new GlideRecord("vtb_card");
grExists.addQuery("task", taskObject.sys_id);
grExists.addQuery("board", snowBoardToAddTo_SysID);

grExists.query(); // Issue the query to the database
//gs.print(grExists.hasNext());
if (!grExists.next()) {
//add the record
//gs.print("adding");
var grCard = new GlideRecord("vtb_card");
grCard.initialize();
grCard.setValue("board", snowBoardToAddTo_SysID);
grCard.setValue("lane", requestsLaneID);
grCard.setValue("task", taskObject.sys_id);

grCard.insert();
}
else{
//gs.print("Record already exists");
}
}
}

 

Community Alums
Not applicable

Thank you so much. Highly appreciated.