cmdb_ci field on incident is not getting read only

HanumanthaRR
Tera Contributor

Hi Everyone,

When an incident is closed, CI field is getting read only because of the OOB UI policy "Make Fields read-only on close". as part of an enhancement, I have deleted the UI policy action of cmdb_ci. so its is editable even after incident is closed.

later as per discussions in the internal team, reverted the changes. then cmdb_ci field expected to be readonly on closing the incident. but ci field is editable even after closing the incident.

please see below screenshots where the ui policies are same as OOB version. but i am not understanding why the ci field is not getting readonly.

 

HanumanthaRR_1-1793903182803.png

 

HanumanthaRR_0-1793903149654.png

 

7 REPLIES 7

AshishKM
Kilo Patron

Hi @HanumanthaRR ,

As per given screen shot, seems like you create a new UI Policy on incident table, but condition is not matched with OOTB UI Policy "Make fields read-only on close".

 

You can also check if the deleted UI Policy Action can be retrieved from Delete Table. 

Second, you can add new UI Policy Action under OOTB UI Policy

Or you can update the condition in your custom UI Policy same as OOTB.

 

This UI Policy is only enforcing the mandatory check on form load. 

AshishKM_0-1793905494244.png

 

Thanks,

AshishKM

Hi @AshishKM ,

These UI policies were there since long time. I am wondering why this is behaving suddenly like this after i make changes and reverted . please suggest

Hi @HanumanthaRR, checking on this, if issue resolved or not. Reverting (not creating new) should work if you manage to "un-delete" any object in this regard. 

 

Thanks,

AshishKM

kmohammed
Tera Guru

Hi HanumanthaRR,

 

Reverting the UI Policy does not bring back a deleted UI Policy Action — the action is a separate record, and the policy looking the same as OOB does not mean its actions are intact. The clue is in the screenshot: the cmdb_ci action that still exists belongs to the "Default Mandatory field" policy, and it sets Mandatory = True with Read only = Leave alone. That is why the field is still editable on a closed incident — nothing is setting it read-only.

 

Fix it this way:

 

1. Open the OOB policy "Make fields read-only on close" and check its own UI Policy Actions related list (filter Field name = cmdb_ci). If there is no action for cmdb_ci there, that is the gap.

2. Add it back: New UI Policy Action under that policy, Field = cmdb_ci, Read only = True. Also check the action's own Active checkbox — a recreated action can be inactive.

3. If you would rather recover the original, look in System Definition > Deleted Records for the deleted UI Policy Action record and restore it.

4. Test by opening a closed incident fresh (not by changing the state on an already-open form), since this policy evaluates on load. If it still stays editable after the action is back, check for a conflicting UI Policy or Client Script that sets cmdb_ci editable again, for example g_form.setReadOnly('cmdb_ci', false).

 

The most likely fix is step 2 — recreate the cmdb_ci action under the read-only-on-close policy with Read only = True.

 

If this helped, please mark it as Helpful — and if it solved your issue, I'd be grateful if you accepted it as the solution.