How to filter CI item on user but be able to Disable/override the filter (un-link users and CI Items) on the incident window

Version 27

    Verified Product Versions

    LANDESK Service Desk 7.7.xLANDESK Service Desk 7.8.xLANDESK Service Desk 2016.xLANDESK Asset Central 2016.x

    Question

    Would like to select a raise user on the incident window and have the config item attribute filtered to display only CI items associated to that user.  Would also want to be able to click 'Clear Selection' and select any config item in the system, even if they are associated to a different user in a similar way to how classic helpdesk could un-link config items using the "Toggle Customer Linking" button.

    Answer

     

    NOTE: Before carrying out these instructions, I would recommend that you try this out on a test system initially, check you are happy with the results, then roll the changes out to your LIVE database. When making the changes in your LIVE environment, please ensure that you have a full working backup of your database - and that all users are out of Console and the serviceportal. If there are any issues, restore the database backup you took immediately prior to making the changes.

     

    If you are on ServiceDesk 7.2.6 you will need to run the attached script to to create a "Users" collection on the Configuration Item object that links to the existing UserConfigItems linking object.

     

    If you are on ServiceDesk 7.3 or later, you DO NOT need to run the attached script and simply need to follow the steps below.

     

    Setup two conditional filters on the 'Confiuration Item' atribute on the Incident business object:

     

    1. Open Object Designer and on the Incident object create a Boolean attribute named Disable CI Filter.

    2. If using from version 7.2.6 set the Default Value property to False.*

    3. On the Configuration Item attribute open the Filter Selectors window.

    4. Click the New Filter Rule button and then select [New] in the 'Select the Filter Query to Apply to this Rule' dropdown list.

    5. In the' New filter' dialog box, type 'CI Item Filter on User' in the Title, check 'Everyone' and click OK.

    6.  In the 'Filter Builder' window, drag 'Title' to the 'Selected Attributes' pane.

    7.  Select 'Criteria' in the 'Filter' pane and drag 'User Configuration Items.User' to the 'Criteria' pane.  Set condition to 'Is Equal To', check 'Specify A Runtime Value'.  Check 'Raise User' in the tree and click OK.

    8.  Drag 'Class Type' to the 'Criteria' pane.  Set condition to 'Is Equal To', check 'Specify A Runtime Value'.  Check 'Configuration Item Type' in the tree and click OK.  See the screenshot below for how the window should now look:

    CI Filter on User.JPG

    9. Click the Finish Button. Click Yes to save changes if prompted

    10. With the 'CI Items Filter on User' filter selected in the list press the 'New Condition' button.

    11. In the attribute tree at the bottom left of the window check the box next to Disable CI Filter.

    12. In the text box to the right type 'False' and then press the 'Apply Condition' button.  See the screenshot below for how the window should now look:

    CI Filter on User conditions.JPG

     

    13. Click the New Filter Rule button and then select [New] in the 'Select the Filter Query to Apply to this Rule' dropdown list.

    14. In the' New filter' dialog box, type 'CI Item Filter' in the Title, check 'Everyone' and click OK.

    15.  In the 'Filter Builder' window, drag 'Title' to the 'Selected Attributes' pane.

    16.  Select 'Criteria' in the 'Filter' pane and drag 'Class Type' to the 'Criteria' pane.  Set condition to 'Is Equal To', check 'Specify A Runtime Value'.  Check 'Configuration Item Type' in the tree and click OK.

    17. Click the Finish Button. Click Yes to save changes if prompted.

    18. With the 'CI Items Filter' filter selected in the list press the 'New Condition' button.

    19. In the attribute tree at the bottom left of the window check the box next to Disable CI Filter.

    20. In the text box to the right type 'True' and then press the 'Apply Condition' button.  See the screenshot below for how the window should now look:

    CI Filters conditions.JPG

    21. Click OK to save the settings then click Save in Object Designer to commit these changes to the object.

     

    Setup the filter on the 'Configuration Item Type' attribute on the Incident business object:

     

    22. Open the 'Incident' object in Object Designer, select the 'Configuration Item Type' attribute open the 'Filter Selectors' window.

    23. Click the 'New Filter Rule' button and then select [New] in the 'Select the Filter Query to Apply to this Rule' dropdown list.

    24. In the' New filter' dialog box, type 'CI Type Filter' in the Title, check 'Everyone' and click OK.

    25.  In the 'Filter Builder' window, drag 'Title' to the 'Selected 'Attributes' pane.

    26.  Select 'Criteria' in the 'Filter' pane and drag 'Client Class' to the 'Criteria' pane.  Set condition to 'Is One Of', Add the following Values 'Touchpaper.ClientClasses.AssetManagement.Asset', 'Touchpaper.ClientClasses.AssetManagement.Service' and 'Touchpaper.ClientClasses.ConfigManagement.ConfigItem' (You may want to add some additional values depending on the config types you have setup on your system).  Click OK.

    27. Click Finish, Click Yes to save changes if prompted. Click Ok, then Click Save in Object Designer to commit these changes to the object.

     

    Setup a Copy Rule to populate the Configuration Type when the Configuration Item is selected on the Incident window:

     

    28. In Window Manager and open your 'Incident' window.  Add the Disable User Filter checkbox to the window and press Save.

    29. In Window Manager, expand Incident Managment and right click on Incident. select Business Object Copy Rules.

    30. Within the Copy Rules configuration window, expand Incident Management and right click Incident and select New Rule.

    31. Within the Rule editor, set the Description to 'Populate CI Type'. Click on the 'Select Attribute' button to the right of the 'Target' field and select 'Configuration Item Type' by double clicking on it in the tree then clicking OK.  The target field will now be populated with 'ConfigurationItemType'

    32. Click on the 'Select Attributes' button to the right of the 'Sources' field and drag 'Configuration Item.Class Type' to the right pane.  The right pane will now display 'ConfigurationItem.Class'.

    33. Click Ok and leave the checkbox "Always execute rule" checked. Click Ok

    34. In Window Manager, open the 'Incident' window. Select the 'Configuration Item' attribute and oepn it's properties. Set the 'Copy Related' property to True (The Copy Related property is at the very top under the Configurable Properties heading.  You don't need to set the Copy Related Object property).

    35. Select the 'Configuration Item Type' attribute and oepn it's properties. Set the 'Copy Related' property to True (The Copy Related property is at the very top under the Configurable Properties heading.  You don't need to set the Copy Related Object property).

    36. Check the Advanced properties of the Configuration Type attribute and the Configuration Items attributes and ensure all the properties are set to False as these may confilct with the filters.

    37. Click Save.

     

    Now open an incident and test the Configuration Item Dropdown and Configuration Type dropdown functionality.  Select a Raise User and the Configuration Items will be filtered, check the Disable User Filter box and now the all the configuration items!

    If you have an issue where a filter is not being applied, try removing the filter from the attribute on the business object,  save the object and then re-add the filter and re-save the object.

     

    You can use filter conditions like this to swap between different filters too by adding more filters to the same attribute with different filter conditions (ie. one filter if the checkbox is False, a different filter if it is True).  This adds another dynamic level and can make for very flexible filtering.

     

    * It is important that the checkbox is False and not NULL for this method to work.  In versions prior to 7.2.6 you can still have this value pre-populated with a False by editing the assignment action instance in the process and checking then unchecking the box.  The only downside of this method is you must also pre-populate any mandatory fields including the Title.  This may actually already be pre-populated as is a common setup

    Environment

    ITBM 7.2.6 onwards.