Prevent a Service Family from being set on a Configuration Item
search cancel

Prevent a Service Family from being set on a Configuration Item

book

Article ID: 112696

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

The following has been added to detail_in form in order to prevent users from picking a service here.  While this does work, it lets users use the Clear Filter button to bypass this and actually select an Service.

<PDM_MACRO name=dtlLookup hdr="Configuration Item (c)" attr=affected_resource extraURL="ADDITIONAL_WHERE=(class.type <> 'Service')">

Is there a way to enforce this similarly to how the Affected Service field was setup:
<PDM_MACRO name=dtlLookup hdr="Affected Service (c)" attr="affected_service" evt="onBlur='calculateImpact()'" extraURL="KEEP.service_only=1">

This hardcodes  "Enterprise Service" in the Family field and makes it read only, so a Clear Filter will not remove that setting.  Is there something that can be passed which will not allow Enterprise Services to be selected?

Environment

Release:  17.3 and higher
Component: CA Service Desk Manager

Resolution

Create the following data partition: 

Data Partition: Service Desk Analyst 
Table Name: Call_Req 
Constraint Type: Create 
Constraint: affected_resource.family != 602 
Error Message: Please choose a CI that is not a Service 

With the above in place, any user that is on the "Service Desk Analyst" Data Partition (default DP for users in the Level 1 Analyst Role) who attempt to create a request using an affected CI that is a member of the family id "602" (corresponds to the "Service" family) will be rejected, with the end user being told "Please choose a CI that is not a Service". 

If a CI is selected that is not part of the "Service" family or is left blank, the ticket will be created.

Additional Information

Additional information on setting up a data partition is available in the product documentation on Data Partitions

Call_Req attribute affected_resource is a reference to the nr object, which has the attribute of "family", which in turn references the ca_resource_family table

Running the following command in the SDM server, Admin command prompt:

>pdm_extract -f "select id, name from ca_resource_family where id = 602"
TABLE ca_resource_family
        id name
        { "602" ,"Service" }
ca_resource_family
        rows:1

 

We see the id value of "602" for the "Service" family.  The data partition effectively allows the creation of an entry in the Call_Req table as long as the affected_resource.family is NOT a Service, or in this case, affected_resource.family != 602