cmdb_ci field on incident is not getting read only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @kmohammed ,
Thanks for your reply!
I was able to get the deleted file back.please check below screenshot.
I have opened and closed a new incident but still the ci field is editable.
I suspect that other action on cu field which is "mandatory as true" without any condition is the issue. as other OOB action with higher order ci is "mandatory as leave alone" and "readonly true". please refer the below screenshots.
These UI policy action were there since long time. was wondering why this was not working like this earlier. there are no client script on this ci field.
Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- last edited
3 weeks ago
by
kh-christelle
Hi HanumanthaRR,
Good news first: your screenshots rule out the suspect you named. The 'Default Mandatory field' action sets Mandatory = True but Read only = 'Leave alone', so it cannot make the field editable — and it runs first anyway (Order 100), while 'Make fields read-only on close' runs after it (Order 110), so the read-only action would win any conflict. Your restored action also looks right: cmdb_ci with Read only = True under 'Make fields read-only on close', with the policy Active, On load, and the condition 'State is Closed'.
Since the configuration looks correct, the next step is to find out why it is not firing. Please check these, in order:
1. Test on a fresh form load. That policy is On-load only, so closing an incident on an already-open form does not re-run it. Close the incident, then open the already-closed incident again from the list in a new tab and check the field there.
2. Confirm the State value. The policy condition is 'State is Closed', so open the incident record and check the State field is actually Closed (7) — if it is Resolved (6), the policy correctly does nothing.
3. Rule out anything else touching the field. In UI Policy Actions, filter Table = Incident and Field name = cmdb_ci to see every policy action on the field, not just these two policies; and search client scripts for setReadOnly('cmdb_ci', false).
4. Clear the cache. You restored the action from Deleted Records and UI policy metadata is cached, so open cache.do in your instance and retest.
5. Open the restored action record itself and confirm Read only = True is actually saved on the record — the list shows True, but verify the record.
If it is still editable after a fresh load of a Closed incident, please share the State value, what the full cmdb_ci action list shows, and whether any client script references the field — that will pinpoint it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hello @HanumanthaRR
My recommendation would be to try the following two options:
Option #1: Change the UI Policy Order to 100 and save the UI Policy. Then navigate to All, type cache.do and press Enter to clear the cache. Test again to see if the issue is resolved.
Option #2: If Option #1 does not work, make the current UI Policy inactive, rename it, and save it. Then go to the other instance where the UI Policy is working correctly, export the UI Policy and its associated UI Policy Actions as XML and import them into the corresponding tables in this instance.