Home Analyst Portal

Assign to previous owner

Gerhard_GoossensGerhard_Goossens Customer Advanced IT Monkey ✭✭✭
Good day everyone,

I have been asked this a couple of times from analysts so here it goes...

"When an IR or SR has been assigned to me, is it possible to quickly assign it back to the person who assigned it to me?"

It will make managing WorkItems so much faster if the support group tree and users do not have to be browsed the whole time. 

We have a lot of cases especially outside the Service Desk "1st level" where the WorkItem has to go to the person/group who assigned it to you.

Answers

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Previous user: the last assigned user?  or the person who assigned to the current user?  I'm close on building this task, but I need that clarification....
  • Gerhard_GoossensGerhard_Goossens Customer Advanced IT Monkey ✭✭✭
    @Justin_Workman

    That is an interesting problem... I guess it will vary from environment to environment and how the business rules are set up.

    In our case, it will 90% be to the analyst to whom the WI was last assigned ie previous owner. But there might be an issue if it was not assigned to anyone. 

    So maybe a check to see what support group and assigned user it was assigned to previously, and if the assigned user was blank, to assign to the user who did the reassignment... 


  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    @Gerhard_Goossens - Give this a try and see if it works for you.
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    @Gerhard_Goossens - Give this a try and see if it works for you.

    //sendBack.js
    
    var sendBack = function sendBack() {
    	
    	$.ajax({
    		url: "/Search/GetObjectHistory?id=" + pageForm.viewModel.BaseId, 
    		dataType: "json",
    	    success: function(result, status) {
    			var breakout = 0;
    			$.each(result, function(i,e) {
    				if (e.RelationshipHistory[0] ) {
    					$.each(e.RelationshipHistory, function(index,element) {
    						if (element.RelationshipName === 'Assigned To User' && element.ChangeType === 'Update') {
    							$.get('/User/GetUserSearchResults?sort=&page=1&pageSize=3&group=&filter=&userFilter=' + element.PreviousItem + '&filterByAnalyst=false', function(lastUser) {
    								var assignedUser = $('[data-control-bind="AssignedWorkItem"]').data("kendoAutoComplete");
    								assignedUser.dataSource.add(lastUser.Data[0]);
    								assignedUser.value(lastUser.Data[0].Name);
    								assignedUser.trigger("change");
    							});
    							breakout++;
    							return false;
    						}
    					});
    				}
    				if (breakout > 0) {
    					return false;
    				}
    			});
    	    },
    		error: function(result, status, error) {
    			console.log("error function");
    		},
    	    type: "GET",
    		contentType: "application/json; charset=utf-8",
    	});
    }
    
    app.custom.formTasks.add('Incident', 'Send Back', function (formObj, viewModel) { 
    	
    	sendBack();
    		
    });
    
    app.custom.formTasks.add('ServiceRequest', 'Send Back', function (formObj, viewModel) { 
    	
    	sendBack();
    		
    });
    


Sign In or Register to comment.