Catalog Search not showing "Entire Catalog" as Default

Document ID : KB000109316
Last Modified Date : 08/03/2019
Show Technical Document Details
Question:
Catalog Search not showing "Entire Catalog" as Default
Environment:
ITSM service catalog 17.1, 17.2 
Answer:
This behavior is introduced in 17.1 to show a specific default folder for the end user to search for a specific offering\option
The reason behind for not making Entire Catalog as default (It will a run an expensive Query to fetch the results) (More time required as compared to folder search) .  So  , by default , it is changed to the first folder . 

If you need the default search to 'Entire Catalog'  , you will need to do the following customization :

Steps to achieve the behavior to make entire catalog as default view:
====================================================
1. Need to customize the file catalogbrowse.xsl (Location: %USM_HOME%\view\webapps\usm\explorer\request)

2. Copy the original catalogbrowse.xsl  to file store folder  , and place it under  catalog's filestore\custom\explorer\request\ folder

3.  change the following section :

from :

<select id="foldercombo" tabindex="0" class="ie8-auto-expand" aria-label="{$xslcontent/search_in}" onkeydown="cartpress(event);">  <!-- Accesskey for Combobox for search -->
                <xsl:for-each select="/xmlRoot/COLLECTION/BROWSE_CATALOG/FOLDER[folder_parent_id=$rootID and not(folder_name/LITERAL='___SYSTEM___')]">
                  <option title="{folder_name/LITERAL}" alt="{folder_name/LITERAL}" value="{folder_id/LITERAL}">
                    <xsl:call-template name="shortenName">
                      <xsl:with-param name="str" select="folder_name/LITERAL"/>
                      <xsl:with-param name="shortenLength" select="number(60)"/>
                    </xsl:call-template>
                  </option>
                  <xsl:variable name="curOID" select="folder_id/LITERAL"/>
                  <xsl:for-each select="/xmlRoot/COLLECTION/BROWSE_CATALOG/FOLDER[folder_parent_id/LITERAL=$curOID]">
                    <option title="{folder_name/LITERAL}" alt="{folder_name/LITERAL}" value="{folder_id/LITERAL}">&#xa0;&#xa0;&gt;
                      <xsl:call-template name="shortenName">
                        <xsl:with-param name="str" select="folder_name/LITERAL"/>
                        <xsl:with-param name="shortenLength" select="number(60)"/>
                      </xsl:call-template>
                    </option>
                  </xsl:for-each>
                </xsl:for-each>
                <option title="{$xslcontent/entire_catalog}" alt="{$xslcontent/entire_catalog}" value=""><xsl:value-of select="$xslcontent/entire_catalog"/></option>
              </select>&#xa0;


TO   

            <select id="foldercombo" tabindex="0" class="ie8-auto-expand" aria-label="{$xslcontent/search_in}" onkeydown="cartpress(event);">  <!-- Accesskey for Combobox for search -->
                <option title="{$xslcontent/entire_catalog}" alt="{$xslcontent/entire_catalog}" value=""><xsl:value-of select="$xslcontent/entire_catalog"/></option>
                <xsl:for-each select="/xmlRoot/COLLECTION/BROWSE_CATALOG/FOLDER[folder_parent_id=$rootID and not(folder_name/LITERAL='___SYSTEM___')]">
                  <option title="{folder_name/LITERAL}" alt="{folder_name/LITERAL}" value="{folder_id/LITERAL}">
                    <xsl:call-template name="shortenName">
                      <xsl:with-param name="str" select="folder_name/LITERAL"/>
                      <xsl:with-param name="shortenLength" select="number(60)"/>
                    </xsl:call-template>
                  </option>
                  <xsl:variable name="curOID" select="folder_id/LITERAL"/>
                  <xsl:for-each select="/xmlRoot/COLLECTION/BROWSE_CATALOG/FOLDER[folder_parent_id/LITERAL=$curOID]">
                    <option title="{folder_name/LITERAL}" alt="{folder_name/LITERAL}" value="{folder_id/LITERAL}">&#xa0;&#xa0;&gt;
                      <xsl:call-template name="shortenName">
                        <xsl:with-param name="str" select="folder_name/LITERAL"/>
                        <xsl:with-param name="shortenLength" select="number(60)"/>
                      </xsl:call-template>
                    </option>
                  </xsl:for-each>
                </xsl:for-each>
               
              </select>&#xa0;




In other words ,  you  need to move  highlighted line  
<option title="{$xslcontent/entire_catalog}" alt="{$xslcontent/entire_catalog}" value=""><xsl:value-of select="$xslcontent/entire_catalog"/></option>
up and place it below <select id> tag line 


4.  stop catalog service 

5.   delete all the files under USM_HOME\view\translets\

6.  restart the catalog service to have the change take effect 

5. Restart catalog catalog service to have the 
 
Additional Information:
catalogbrowse.xsl  file ,  the section before change :

User-added image

the section after change :

User-added image