Issue
Description
In an OOB instance there are both a CI Action and Not Allowed CI Action defined. These two records are both used in the "new OpsStatusFilter('cmdb_ci').by('CreateTask').join()" part of the cmdb_ci field reference qualifier for the task table. The purpose is to prevent users from selecting retired CIs as a value for the "cmdb_ci" field in task records. Users can create the own CI Actions and Not Allowed CI Actions to serve similar purposes.
Procedure
- A CI Action is defined
-- In an OOB instance, the "CreateTask" mentioned in the reference qualifier is the CI Action. Its name is "CreateTask" and its description is "Create a Task for the involved CI"
2. A Not Allowed CI Action is defined
-- The Not Allowed CI Action is "CreateTask", applies to CI Type "Configuration Item [cmdb_ci]" and whose Operational Status is "Retired"
3. The reference qualifier calls the "OpsStatusFilter" script include
-- The script include queries the "Not Allowed CI Action [statemgmt_not_allow_actions]" table for any records whose CI Type and Not Allowed Action matches the values passed ("cmdb_ci" and "CreateTask", respectively, in this case) and returns the Operation Status ("Retired" in this case)
-- The result of this is that any CMDB CI that has an Operational Status of "Retired" will be filtered out of the choices available for the "cmdb_ci" field on the task record