No configuration item is created when asset is created using a purchase order if the model has more than one category.

It looks like an issue in createCI in the AssetandCI script include which is called by the Business rule to create the CI.

If more than one category is selected on the model on which the asset is based, the following does not return the CI class (and, therefore, does not know the table in which to create the CI):

ciClass = asset.model_category.cmdb_ci_class.toString();

A model does allow multiple categories, but the Procurement plugin assumes there will only be one. It works because a single sys_id in a slushbucket field can be copied into a reference field, however it fails to copy when there are 2 or more comma separated sys_ids.

Steps to Reproduce

  1. Install the Procurement plugin.
  2. Navigate to Product Catalog > Product Model > Hardware Models.
  3. Click on MacBook Air 13.
  4. Add another category In the Model categories field.
  5. Create a purchase order for one of these product models.
    • Navigate to Procurement > Orders > Purchase Orders.
    • Click New
    • Fill in the Ship to field with any selection.
    • Click Submit.
  6. Open the purchase order.
  7. In the Purchase order line items related list, click New.
  8. Add the following information: 
    • Vendor: Apple
    • Product Model: MacBook Air 13
  9. Click Submit.
  10. On the purchase order, click Order.
  11. Receive the order to create the asset.
    • Click Receive.
    • Select the Allow Asset Tag Input option.
    • Leave the Asset tag field blank.
    • Fill in the S/N with any number.
    • Click OK.
  12. Open the asset record for this asset.
    Note that the Configuration Item field is blank.


Do not associate more then one model category with a model, or modify ProcurementUtils to use only the first model category:

_createAsset: function(po, pol, status, rsl) {
        var asset = new GlideRecord('alm_hardware');
        asset.request_line = pol.request_line;
        asset.model_category = pol.model.cmdb_model_category.split(',')[0];

The change is the addition of the .split(',')[0] when setting the model_category.

Related Problem: PRB599639

Seen In

Calgary Patch 3 Hot Fix 1

Fixed In

Eureka Patch 2

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2016-03-25 14:52:29