Notifications

46 views

Description

Missing pagination in tc-grid widget causes low performance in loading time cards. The hideTcPopover method requires to iterate over all rows with each scroll event. If there are 200+ rows, each scroll event invokes the method and iterates through those rows over and over again.

 

Steps to Reproduce

Go to the timesheet portal and notice it takes around 20" to load.

Workaround

This problem is fixed in New York. The workaround for unresponsiveness consists in editing the Widget tc-grid as shown below.


- Link function: replace the hideTcPopover method with one of the following:

function hideTcPopover(){ 

                                $("#tc-grid-table").find('tbody').find('tr').each(function(e){

                                                var _id = $(this).find('td:last-child').data('id');

                                                if(scope.data['tcPopover' + _id] || scope.data['mergePopover' + _id]){

                                                                scope.data['tcPopover' + _id] = false;

                                                                scope.data['mergePopover' + _id] = false;

                                                                scope.safeDigest();

                                                }

                                });

                }

 

Or:

function hideTcPopover(){ 

                                var _id = $(".popover.fade.in").parent().attr('data-id');

                                if(scope.data['tcPopover' + _id] || scope.data['mergePopover' + _id]){

                                                scope.data['tcPopover' + _id] = false;

                                                scope.data['mergePopover' + _id] = false;

                                                scope.safeDigest();

                                }

}


HTML Template

Remove popover-append-to-body="true" from merge popover <a> tag and add data-id="{{::item.sys_id}}" to its parent div.


Related Problem: PRB1330691

Seen In

SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Security Incident Response PA Content - New York 2019 Q3
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3

Intended Fix Version

Orlando

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-09-18 12:25:42
Published:2019-08-06