48 views

Description

Out-of-the-box in early Jakarta, for any user, the "Requests" menu item link on the top right corner of the Service Portal homepage shows only if there are active tickets raised by the logged-in user. This is a scripted menu item, and is not designed OOB to show in case of no requests present.

 

Steps to Reproduce

 

  1. Navigate to Angular ng-template "memuTemplate" of the "Header Menu" widget:

    <instance>/nav_to.do?uri=/sp_ng_template.do%3Fsys_id%3D1c01e3b05b301200e39fc7ad31f91af7%26sysparm_record_target%3Dsp_ng_template%26sysparm_record_row%3D1%26sysparm_record_rows%3D3%26sysparm_record_list%3Dsp_widget%253D5ef595c1cb12020000f8d856634c9c6e



    2. Remove ".count > 0" after "item.scriptedItems" (line 12 and 17):

    <a role="button" ng-if="item.scriptedItems.count > 0" href="javascript:void(0)" data-toggle="dropdown" title="{{item.hint}}">
    <fa ng-if="item.glyph" name="{{::item.glyph}}"></fa>

    <sp-dropdown-tree role="menu" aria-label="{{::item.label}}" ng-if="item.scriptedItems.count > 0" items="item.scriptedItems.items" />

    The workaround provided in the SN community for Jakarta Patch 1 was the following:

    https://community.servicenow.com/thread/266693


    3. Navigate to Service Portal home page. Notice that Requests are not still showing:





Workaround

Please see article KB0688949 to verify if your instance is upgraded to one of the versions containing the new SP code. The display of the "Requests" link is controlled by the widget Header Menu. In early Jakarta the workaround below was used in case users were ok to display closed tickets in the dropdown "Requests". The Header Menu widget also would need to be cloned along with its dependencies, and modified accordingly in all its calls.


- Navigate to Service Portal > Portals > Open "sp" (ID) record.

- Open the referenced record in Main Menu field which is SP Header Menu.

- Under Menu Items related list, open Requests (label) record.

- The Server Script field handles the display of active requests in the dropdown when "Requests" is clicked.

- In the script, there are three statements containing addActiveQuery(). This is a method in the GlideRecord object that queries only "active" records.

- Comment those statements and save your updates, you will notice the Requests link shows up in the portal homepage and when you click it, you will see the dropdown showing all tickets (including closed ones).

 


Related Problem: PRB1244279

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-06-06 05:43:15
Published:2018-06-06