Indicator Score showing incorrect value

sivaranjani3894
Tera Guru

Hi All,

i have an indicator source with following condition:
Opened on Today OR Opened before Today
AND
"State is not "Canceled" and "Active is True" and "Assignment Group is GroupABC"

 

Indicator with following condition:
Updated on Today AND
Assignment Group is GroupABC

and I also have a script with following code:

 

checkIncidentTask(current.sys_id);
function checkIncidentTask(sysid) {
var inc_task1 = new GlideRecord('incident_task');
inc_task1.addEncodedQuery('incident!=NULL^incident=' + sysid);
inc_task1.query();
if (inc_task1.next()) { //check if incident tasks are available
return 1;
} else {
return 0;
}
}
 
There are no incidents with Task that were "Updated on Today" but score on this indicator is as follows:
sivaranjani3894_0-1733643260358.png

I am not sure where am going wrong. Please help.

 

Thanks,

Siva

3 REPLIES 3

Uncle Rob
Kilo Patron

That would have been yesterday, AND the updated date could have changed since the last measure.

sivaranjani3894
Tera Guru

@Uncle Rob Thanks for the response!
There are no incidents with tasks in the Test instance where this indicator is present.

Community Alums
Not applicable

 

Adjust the conditions in the indicator source and indicator to ensure mutual exclusivity and prevent overlaps.
Modify the checkIncidentTask function to handle edge cases, such as:

  • sys_id being null.
  • Incident tasks with unexpected states or dates.

    function checkIncidentTask(sysid) {
    var inc_task1 = new GlideRecord('incident_task');
    inc_task1.addQuery('incident', sysid);
    inc_task1.query();
    return inc_task1.hasNext() ? 1 : 0;
    }

    If you found this as useful please mark as helpful and accept as solution.