Make Operational Status dependent on Status field on CMDB_CI. Showing numeric value in dropdown as 2 in Operational status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2020 02:21 PM
Numeric value getting set whenever trying to make "Operational Status" field on cmdb_ci dependent on "Status" field.
Screenshots capture below are from my PDI.
This is OOB install_status field on CI table, I have disable other values as per my requirement.
This is OOB Operational Status field where I have added dependent field values of status field.
Dictionary of operational status field
This is how it is appearing on form
INCORRECT data and only for "In maintenance" I am facing this issue. any idea how to fix this.
If you save "In Maintenance " on Asset and click save, CI also gets updated but with numeric in drop down
Default value is being taken by system is 2, so above "Non-Operational" is 2 thats why it is showing Label as well. However below ...no label is present thats why it is showing as only 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 04:13 AM
Per your definition, the only valid choice for Operational Status when Status is 'In Maintenance' (3) is 'Repair in Progress' (3). Since Operational Status has a Default value of 1, the CI Operational status is getting set to 1 when the CI Status changes to In Maintenance by the OOTB script that syncs asset and CI data. It's showing 1 when I do this on my PDI with your specs, not 2. You can either remove the Default value on Operational status, or change the dependent value for the choice of this default value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 07:12 AM
Hi Brad,
Thanks for investing time 🙂
So on your PDI, if once you change Status to "Retired" on Asset then same will get updated in Status on Related CI and Operational status will also be retired.
Then from Retire to any other state changes you do then Operational status will automatically go as "Non - Operational" then 2 will appear in drop down.
However I tried to remove default value still 1 is appearing.
What I can see is there is some BR or any sort of script running in background which changes Operational status to 1 or 2 i.e. Operational and non operational.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 08:32 AM
For this, take a look at the OOTB Business Rule named Sync Ops Status for CMDB CI which is running on the cmdb_ci table. The intent of this is to not leave Ops Status as is when Status changes as it would likely leave an invalid choice in most scenarios, so it's trying to default it to a universal option. You can copy this rule (so that future upgrades don't skip it) deactivate the OOTB one, then modify the script that it works for your use cases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 12:48 PM
Actually I already tried to debug using breakpoints in this BR but breakpoints never come to this BR.
Also I deactivated this BR still everything was working as is. 😛 dont know whats exact reason behind this behavior.
Again thanks for your help and time 🙂