Reference Qualifier for configuration item field in Change request form is not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 07:23 AM
Hi All,
We have to filter out the retired CIs from being selected in the change request form.We have created a reference qualifier and we have created a script include and updated the encoded query in the script include. It was working as expected till now.
Now , we have a request to update the filter as shown below :
class= hardware and install_status != retired and install_status!= absent or install_status= retired and hardware status = in stock
and the script include condition looks like this
"sys_class_name=cmdb_ci_computer^install_status!=7^install_status!=100^NQinstall_status=7^hardware_status=in_stock";
but this brings all the retired CIs irrespective of hardware status.
Can you please let me know if there are any other ways to achieve this filter?
Thanks,
Vennila
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 06:43 AM
Hello @VennilaP ,
Using operator(^NQ) in encoded queries, creates another clause for condtion builder. So If you closely check my previously given query I revomed the (^NQ) and replaced with (^OR) operatior.
If you try your query directly on cmdb_ci table list view. It will show you the difference between this operator.
******Try using SNutils as the conditions are to much to add manually in condition builder.
Kindly mark my answer as Correct and helpful based on the Impact.
Regards,
Siddhesh