Dynamic Filter on Configuration Item doesnt work

Community Alums
Not applicable

I have a dynamic filter screenshot below :

Vibhuti_0-1744013822821.png

which calls the SI : TSDynamicFilter.

Script : 

var TSDynamicFilter = Class.create();
TSDynamicFilter.prototype = Object.extendsObject(AbstractAjaxProcessor, {



getMyManagedTS: function() {
        var my_managed_ts = [];
       
        var ts = new GlideRecord("cmdb_rel_team");
        ts.addEncodedQuery('group_type=approval^user_group.manager=' + gs.getUserID()); 
       
        ts.query();
        while (ts.next()) {
            var ts_sys_id = ts.ci;

            my_managed_ts.push(ts_sys_id.toString());
        }
     
        return my_managed_ts;
    },


    type: 'TSDynamicFilter'
});
 
when i go to incident table and filter configuration item is dynamic Mymanagedts
I get all the records that have empty Configuration item and not the actual result of 15 incidents belonging to my approval team CI.
 
Kindly let me know what M i missing ?
everything is in global scope . also we need to use the cmdb_rel_team table only for this POC.
 
Vibhuti_1-1744014052833.png

 

this works through background script , but through dynamic filter even the SI is not called as none of my logs were created .

0 REPLIES 0