Report on Incidents without Response SLA

kumar22
Tera Contributor

Hi team, 

As per the current behavior in the system, while creating Incidents if we select the Assignment Group and Assigned to the Response SLAs are attached to this type of Incidents.

Now I would like to create a report that gives the list of Incidents which has no Response SLAs.

 

Please advise on this!

Thanks,

13 REPLIES 13

SO create a normal report on Inc table

where Assigned to is empty and Assignment group is empty

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

AndersBGS
Tera Patron
Tera Patron

Hi @kumar22 ,

 

Just run the report created through the report designer as below:

AndersBGS_0-1707393055293.png

Remember:

  1. Report is based on the incident table
  2. Related list condition - greater than or equal should be set to "0"
  3. Apply any other conditions that you would like.

if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders 

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

kumar22
Tera Contributor

Hi All, 

I achieved this by using the fix scripts and it is working fine and gives the proper details while running through the fix scripts. But I moved the code to Script include which gives a single record only. 

Fix script:

var inc = new GlideRecord('incident');
inc.addActiveQuery();
inc.query();
while(inc.next()){
var tsla = new GlideRecord('task_sla');
tsla.addQuery('task', 'inc.sys_id');
tsla.addEncodedQuery('sla.target=response');
tsla.addEncodedQuery('sla.target!=resolution');
tsla.addEncodedQuery('sla.target!=NULL');
tsla.query();
if(!tsla.hasNext()){
var incArray = [];
incArray.push(inc.number);
gs.print(inc.number);
}
}
--------------------- 
Script Include:
function INC_without_response_sla() {

    var inc = new GlideRecord('incident');
    inc.addActiveQuery();
    inc.query();
    while (inc.next()) {
        var tsla = new GlideRecord('task_sla');
        tsla.addQuery('task', 'inc.sys_id');
        tsla.addEncodedQuery('sla.target=response');
        tsla.addEncodedQuery('sla.target!=resolution^ORsla.target=NULL');
        tsla.query();
        if (!tsla.hasNext()) {
            var incArray = [];
            incArray.push(inc.number);
            return incArray;
        }

    }
---------------------
Can someone help with this?
Thanks in advance!!

Hi @kumar22 

 

I am not sure buddy, why you are using script, when you can achieve this OOTB way, as suggested by many other community members.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************