Notifications

254 views

Description

When searching for Content Items (sc_cat_item_content) records from Service Portal using the typeahead search widget, the icon associated to the sc_cat_item_content record does not get displayed. Icons associated to Catalog Items also display fine in the Service Portal search.   

Steps to Reproduce

 

  1. Go to the Content Items (sc_cat_item_content) list and create a new record or open an existing one.

  2. Make sure that the Picture field has an image attached to it.

  3. Go to Global Search and search for the content item.

    Note that the icon displays in the returned search result.

  4. Go to Service Portal and enter the content item name in the typeahead search.

    Note that no icon is displayed next to the returned typeahead search result.

 

Workaround

Note – The attached 'sp_search_source_c96eb1686721220023c82e08f585efff.xml file has a fix for this issue, so importing this file into the instance will resolve this issue.

Check the following procedure for details about the fix for this issue.

  1. Go to sp_search_source.list and open the sp_search_source record with Name=Service Catalog

  2. In the Service Catalog Search Source, add 'icon' to the $sp.getRecordDisplayValues list in the Data fetch script section in line 33:

    $sp.getRecordDisplayValues(item, sc, 'name,short_description,picture,icon,price,sys_id,sys_class_name');

  3. Add the following line to the Typeahead template section of the same sp_search_source record for Service Catalog: 

    <i class="ta-img" ng-if="match.model.type=='sc_content' && match.model.content_type != 'kb' && match.model.icon" style="background-image:url('{{match.model.icon}}')"></i>

Related Problem: PRB1262997

Seen In

There is no data to report.

Fixed In

Madrid

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:42:17
Published:2019-03-31