Affected CIs default filter on Change Request for ADD button

sry
Giga Guru

Hi, i had a quick question to be answered. please help me.

on change request we have ADD button to add "Affected CIs". When user click on ADD we are by default letting him to select only the CIs which are set "Monitor = True". you can see in the below screen shots.

But the user is able to modify the filter entirely changing it to Monitor=false or something else he wants. Requirement is we do not want the user to modify this default filter or we only want to display the CIs which are set "Monitor=True" irrespective of what CLASS the user choose.

 

Is there a way we can develop this by default to show only the CIs that are Monitor=True when user click on ADD? without any default filter?

1) user clicks on ADD

find_real_file.png

 

2) Now "Add affected configuraiton Items dailog window appears with default filter that we setup

find_real_file.png

3) You can see in the below screen shot how we setup that filter modifying script include

find_real_file.png

 

thanks,

sry

4 REPLIES 4

Brian Lancaster
Tera Sage

You can probably use something like this to set your default filter.

Hi Brian, thank you for the prompt reply. I tried below but the filter is default showing ALL CIs, its not working in the script i think. may be it only works for list modules.

url.set("sysparm_fixed_query",'monitor=true');

find_real_file.png

 

thanks,

sry

shouldn't it be url.set('&sysparm_fixed_query=monitor=true').

Hi Brian, i have used '&sysparm_fixed_query=monitor=true' but i am getting a blank screen. so its not working either.

below is the logice that is returning the URL for dialog window

 

var url = new GlideURL("task_add_affected_cis.do");
url.set("sysparm_crSysId", chgReqId);
url.set("sysparm_view", "associate_ci");
url.set("sysparm_add_to", addToTable);
url.set("sysparm_stack", "no");
url.set("sysparm_table", latestClassAdded);
url.set("sysparm_parent_class", parentClass);
url.set("&sysparm_fixed_query=monitor=true");
return url;

 

thanks,

sry