Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

catalgo task assignment group is different from assignment group

Sathiskumar_D
Tera Sage

Hello,

 

I am trying to create a report where parent task type "catalog task" assignment group is not same as requested item?since I am pulling "task" table in the report, I can't get it done. Any help would be greatly appreciated.

7 REPLIES 7

Najmuddin Mohd
Giga Sage

Hi @Sathiskumar_D ,

Can you please expand a bit more. Probably with an example.

Are you checking, a catalog task assignment group is different from the Request Item Assignment group.


Regards,
Najmuddin.

Yes. I am trying to find if catalog task assignment group is different from request item assignment group. If so, I want the list in report that is created from "task" table.

Bhavani Shankar
Tera Guru

Hello Satish,

 

You have to write a client callable script include such as this.

var MyTaskUtils = Class.create();
MyTaskUtils.prototype = Object.extendsObject(AbstractAjaxProcessor, {
		getTasks: function(){
		var sysIds = [];
		var gr = new GlideRecord("sc_task");
		//add addQuery statement to reduce the number of records to query
		gr.query();

		while(gr.next()){
			// if assignment group in both places is not empty and if it is not matching
			if(gr.request_item.assignment_group != "" && gr.assignment_group != "" && gr.request_item.assignment_group != gr.assignment_group){
				sysIds.push(gr.getValue("sys_id"));  //pushes the sys id of the sc task to an array
			}
		}

		return sysIds.join(","); //returns comma separated array
	},
    type: 'MyTaskUtils'
});

 

Then create a report on sc_task table and have the filter condition like this

BhavaniShankar_0-1724085395683.png

 

This should do the job. 

 

Please do leave a thumbs up if my response helped you.

 

 

Isn't possible to get the result desired results without scripting? is it possible to use related conditions in the report?