Auto release from 'on hold' state

jonny27
Giga Contributor

Hello! I'm wondering what the best way is to tackle this, please? Basically, our Service Desk Manager would like incidents that are on hold to have a specified release date. I've built in the extra state, the queue and the follow up date and time, however I need tickets that are on hold and assigned to the 'acknowledged' queue to be automatically assigned to the Service Desk queue when the time elapses. Am I best of doing this through a workflow or through a business rule, and how would I make sure it's done every time, so, for instance if an incident is put on hold twice during its life cycle? 

In summary - how to I change the state to 'assigned' and the assigned group to 'Service Desk' when the stipulated time elapses?

Your friendly Yorkshireman. 

find_real_file.png

1 ACCEPTED SOLUTION

You can trigger it using broadcastevent from a business rule, then on your workflow you can add an activity called "Wait for WF Event". When the event is triggered you can then have timer and do the logic you wanted.

View solution in original post

5 REPLIES 5

Raf1
Tera Guru

Have you considered a scheduled job to update the incidents based on your criteria?

 

So on your scheduled job it would look something like this:

 

find_real_file.png

jonny27
Giga Contributor

I'm an open book, mate. I just want the best solution on how to achieve this. I aren't blessed with amazing script writing abilities, though.

You can use scheduled script execution and execute a similar script below:

 

function incidentFollowUpDue(){
	var gr =new GlideRecord("incident");
	gr.addEncodedQuery("state=3^assignment_group=d625dccec0a8016700a222a0f7900d06^active=true"); //query all active incidents that are on-hold and assigned to service desk
	gr.query();
	while(gr.next()){
		if(gr.u_follow_up_date <= gs.daysAgo(-1)){ // if follow-up date is a day ago, you can set the integer to specify the number of days elapsed.
			gr.state=2; //Set state
			gr.assignment_group = "sysId"; //Set Assignment group 
		}
		gr.update(); //update the current record
	}
}

jonny27
Giga Contributor

Thanks for that. I don't think I want it to be a daily scheduled job; more adhoc, so when the time elapses on the ticket, that's when it releases. 

I've put in a workflow which makes sense, but I'm not sure I can make it trigger...