Loading...
Loading...
When we configure "Custom" type tabs in Standard Ticket Configuration and add "Visible" conditions to show/hide respective tabs, these are not honored unless the portal page is refreshed manually. This used to work in Quebec and Paris and the standard ticket tabs are automatically shown/hidden when some change happens to the record in backend. Steps to Reproduce 1) Login to any "Rome" ServiceNow instance as admin 2) Go to: Standard Ticket Configuration -> Open the "sc_req_item" record 3) Create a new Tab Configuration called "Approvals" with following details: ========== Type: Custom Tab name: Approvals Visible: State is Open Widget: (any widget) Example: Approval Info ========== 4) Now, submit any catalog item (example: Apple iPad3) whose state will be "Open" when the catalog item is requested 5) Open the RITM generated in standard ticket page Example: https://<instance_name>.service-now.com/sp?id=ticket&table=sc_req_item&sys_id=<sysId>&view=sp 6) Observe that the state of the RITM is open and hence the "Approvers" tab is visible 7) Now, open the RITM record generated from step 4 from the backend in native UI in a separate tab and change the state from Open to anything else (Closed Complete or Closed Incomplete) Example: https://<instance_name>.service-now.com/sc_req_item.do?sys_id=<sysId> 8) Observe the RITM in the standard ticket page in the service portal, Check "State" in the ticket header and also the "Approvals' tab, the state change is reflected as expected but the approvers tab is not hidden. Expected: Approvers tab should be hidden automatically as 'State' is not Open anymore Actual: Approvers tab is still visible although State is changed NOTE: Approvers tab is hidden as expected only after page refresh. This issue doesn't happen in Quebec or Paris. Occurs only in ROME.
This problem is occurring due to a synch error in the widget code. It can be corrected by cloning the OOB widget "Standard Ticket Tab" and making the following modificatiions: 1. In the Client Controller, Comment out line no.71 like below: //c.data.tabsCopy = Array.from(c.data.tabs); 2. In the Client controller, replace line no.77: from: $scope.server.update(); to: $scope.server.update().then(function() { $timeout(function(){ doAdapt(); c.more_title = "${More_menu}"; }, 0); }); 3. Replace line no. 102 and 103: from: primaryItems[item].id = 'uib-st-tab-' + c.data.tabsCopy[i].order; moreItems[item].id = 'uib-more-tab-' + c.data.tabsCopy[i].order; to: primaryItems[item].id = 'uib-st-tab-' + c.data.tabs[i].order; moreItems[item].id = 'uib-more-tab-' + c.data.tabs[i].order; 4. In HTML Template, replace line no.1 and line no.2: from: <uib-tabset ng-if="data.canRead && data.tabsCopy.length > 0" id="std-uib-tabset"> <uib-tab class= "uib-vis-tab" ng-repeat="tab in data.tabsCopy" index="$index" heading="{{tab.name}}" ng-click="onTabClick(tab)" data-toggle="tooltip" title="{{tab.name}}" ng-keyup="c.keyUpOnTabs($event)" add-uib-tab-accessibility> to: <uib-tabset ng-if="data.canRead && data.tabs.length > 0" id="std-uib-tabset"> <uib-tab class= "uib-vis-tab" ng-repeat="tab in data.tabs" index="$index" heading="{{tab.name}}" ng-click="$event.stopPropagation();onTabClick(tab)" data-toggle="tooltip" title="{{tab.name}}" ng-keyup="c.keyUpOnTabs($event)" add-uib-tab-accessibility> 5. Also, replace line no.15 from: <uib-tab class="uib-more-tab" ng-repeat="tab in data.tabsCopy" heading="{{tab.name}}" id="{{tab.name}}" ng-click="tabSelectedInMore(tab)" data-toggle="tooltip" title="{{tab.name}}"> to: <uib-tab class="uib-more-tab" ng-repeat="tab in data.tabs" heading="{{tab.name}}" id="{{tab.name}}" ng-click="$event.stopPropagation();tabSelectedInMore(tab)" data-toggle="tooltip" title="{{tab.name}}"> Now, use this cloned widget in place of the OOB "Standard Ticket Tab" by replacing it on the widget instance on your "ticket" page. A sample widget XML has been attached as a reference to the PRB ticket.
PRB1530576
Click on a version to see all relevant bugs
ServiceNow Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.