Default Category of Affected Configuration Items Field on Change Request
Best Answers
-
Nicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭This is mostly possible out-of-box. To do so, add the following to your /CustomSpace/ChangeRequest.js file.{name: "Business Services",type: "multipleObjectPicker",PropertyName: "RelatesToConfigItem",ClassId: "b2a806a6-87f6-0bc9-da74-c27e9ab5a5d7",PropertyToDisplay: {DisplayName:"DisplayName",LastModified:"LastModified"},SelectableRow: true,},
This will cause only the Business Services class to appear in the pop-up window, as so:
Okay now for the two caveats:
1) The relationship used here is still Work-Item-to-Configuration-Item, so if there are non-Business-Services objects already linked, you will see them on the form itself (still not in the pop-up window). This isn't a problem if you restrict the areas in which an analyst can link a WI to a CI.
2) You cannot use this control in tandem with the canned-related-items picker, otherwise you will get an error. If you use the above, remove the below from the ChangeRequest.js file:{name: "RelatedConfigurationItems",type: "relatedItems"},
Thanks,
Nick5 -
Nicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭One more note, the above uses the "Work Item Relates to Config Item" relationship, but if you wanted to use the "Work Item Affects Config Item" relationship, replace the PropertyName above with "HasRelatedWorkItems"
In turn, you would need to make sure you are not using the following canned control:{name: "AffectedConfigurationItems",type: "affectedItems"},5 -
Nicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭@Nick_Flint Unfortunately, the search field directly on the form is part of the canned related/affected item controls, and isn't available as part of the multipleObjectPicker.5
Answers
/Search/GetObjectsByCriteria
endpoint, setup the criteria to only include the Business Service class, and make sure to commit the selected CI to the CR. It's not impossible, but seems like a lot of work, for something that already is included in the current fieldThis will cause only the Business Services class to appear in the pop-up window, as so:
Okay now for the two caveats:
1) The relationship used here is still Work-Item-to-Configuration-Item, so if there are non-Business-Services objects already linked, you will see them on the form itself (still not in the pop-up window). This isn't a problem if you restrict the areas in which an analyst can link a WI to a CI.
2) You cannot use this control in tandem with the canned-related-items picker, otherwise you will get an error. If you use the above, remove the below from the ChangeRequest.js file:
Thanks,
Nick
In turn, you would need to make sure you are not using the following canned control:
That's pretty neat actually! Does this work with any type of class and relationship (which are valid in SCSM of course)?
Is having the search field on the form possible too? I'm thinking that functionality is why Affected Configurations Items is a canned field.