How can we check if an incident was assigned to a particular group in past though it is assigned to some other group now?

Shashank Vashi1
Mega Guru
Mega Guru

Please tell the possible ways to find if incident was assigned to any group in past though it is assigned to any other group now.

6 REPLIES 6

bharu
Kilo Expert

Hi,



You can check it in the "Activity" section. Add "Assignment group" to Activity section.



Let me know if you have any question.



Hit like/helpful/correct answer..




Thanks


Bhargava


Hi Bhargava,



Thank you for the answer.



But I want all list of incidents which has a particular assignment group in past.



Thanks & Regards,


Shashank Vashist


Hi Shashank,



You can get it from the sys_history_line table. Try this in your background script:



var gr = new GlideRecord("sys_history_line");


gr.addEncodedQuery("set.id=2cef88af6f311200211854b41c3ee4c4^field=assignment_group"); // use a sys_id of a ticket that was reassigned a couple of times or just create one


gr.query();



if (gr.hasNext()) {


  while(gr.next()){


  gs.print(gr.getValue("new"))


  }


}



This will give you a list of teams a ticket was assigned to.



Cheers



Greg


Namrata Makasa1
Giga Expert

hi,


i found a way in which you can pull out a report for this


but the issue is that you will get only the sys_ids as the report is being pulled out from the audit table.



find_real_file.png


Hope this helps.