How to hide certain reason choices on the Request Exception UI Page popup?

TravisOC
Giga Guru

Does anybody know how you can hide one of the reason choices on the popup for the Request Exceptions? We want to hide the Risk Accepted option. I scoured the review_request UI page and cannot figure it out.

 

Screenshot 2024-12-04 153652.png

 

Thanks!

2 REPLIES 2

-O-
Kilo Patron
Kilo Patron

First the choices are loaded starting on line 90 (to be more exact on lines 92, 95 or 98😞

<j:choose>
	<j:when test="${JS:sysparm_is_entry == 'true'}">
		<g:evaluate var="jvar_not_important"
			expression="var cl = GlideChoiceList.getChoiceList('sn_vul_vulnerability', 'substate');"/>
	</j:when>
	<j:when test="${JS:sysparm_is_cvit == 'true'}">
		<g:evaluate var="jvar_not_important"
			expression="var cl = GlideChoiceList.getChoiceList('sn_vul_container_image_vulnerable_item', 'substate');" />
	</j:when>
	<j:otherwise>
		<g:evaluate var="jvar_not_important"
			expression="var cl = GlideChoiceList.getChoiceList('sn_vul_vulnerable_item', 'substate');"/>
	</j:otherwise>
</j:choose>

Basically whatever is in the substate choice list will become the list here.

 

Second the loaded choices are "used" on line 101 (to be more exact on line 103😞

<select id="substate" class="form-control" name="substate" onchange="onReasonChange();"
		required="required" aria-required="true" style="width: auto;">
	<g:options choiceList="${cl}"/>
</select>

 

So if you want to customize the available choices, you need to either modify the choices on the table (of course this will also affect forms and lists) or modify lines 92, 95, 98 in the UI Page replacing the var cl = GlideChoiceList.getChoiceList('sn_vul_vulnerable_item', 'substate'); stuff in the expression attribute of the g:evaluate nodes with the logic that produces the desired set of choices.

superhumanben
Tera Contributor

Depending on which plugin you're trying to do, it may be easier to change the choice lists themselves. I know for Configuration Compliance it's reliant on Dependent Value 12. I removed the 12 on any value I didn't want and it removed it from the list.
This was at least the way I was able to find them and ensure IT Remediation Workspace and Native View were both in sync.


sys_choice_list.do?sysparm_first_row=1&sysparm_query=name%3Dsn_vulc_result_group%5Eelement%3Dresolution%5Elanguage%3Den%5Edependent_value%3D12&sysparm_view=