Auto-Assign Tasks For Specific Assignment Groups when a RITM is Assigned

Dan13
Tera Expert

I have a requirement to automatically assign tasks that are assigned to our Service Desk assignment group to the person that is assigned the the RITM.

Example:

find_real_file.png

John Smith is assigned to this RITM.

As tasks are created as the Flow progresses, they should all be assigned to John Smith if the tasks assignment group is Service Desk. In this example, John would be assigned to the top and bottom task and not the middle one.

find_real_file.png

 

I set up a BR to try to achieve this, but I can't get it working for some reason. This is what I've got so far:
find_real_file.png

find_real_file.png

find_real_file.png

Thanks for any help in advance!

1 ACCEPTED SOLUTION

Ah. For that you'd just need another Business Rule on the sc_req_item table after Update with the Filter Conditions Assignment Group is Service Desk AND Assigned to changes.  The script to find any tasks under this RITM, with the same assignment group, and not assigned to a user would look like this.

var tsk = new GlideRecord('sc_task');
tsk.addQuery('assignment_group', current.assignment_group);
tsk.addQuery('assigned_to', '');
tsk.addQuery('request_item', current.sys_id);
tsk.query();
while(tsk.next()){
  tsk.assigned_to = current.assigned_to;
  tsk.update();
}

View solution in original post

10 REPLIES 10

bammar
Kilo Sage
Kilo Sage

First - Make the BR on the RITM table

Triggered on Assignment group = ServiceDesk 

Assigned to is not empty

Assigned to Changes.

you can leave it Before. 

 

Then in the advanced tab - glidequery the SCtask table - find the records that have 

* Same Request Item sys id as the sys id of your RITM

* same Group as the group in your IT

* blank assigned to

while gr.next 

gr.assigned to = current.assigned to

Voila

 

Brad Bowman
Kilo Patron
Kilo Patron

Hi Dan,

Since you want to set the task Assigned to when the catalog tasks are created, your BR looks like it should work.  Try changing it to before and only selecting Insert.  I've had trouble dot-walking on the Actions tab, so if it still doesn't work clear that Set field values, and add the assignment to the script.

current.assigned_to = current.request_item.assigned_to;

 

Ahh my suggested psuedopath assumed that those tasks may have been all created and attached to the Parent RITM- before they determined which individual technician they wanted handling this.

That could be the process/intention - it's always good to have multiple sets of eyes on an issue, to bring different perspectives, interpretations, and approaches.