Web Staff Client: Patrons With Negative Balances Loading

Bug #1642378 reported by Terran McCanna
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Web Staff Client 2.11:

The Patrons with Negative Balances screen can take a very long time to load and it says "No Items to Display" while it is loading, so many staff would think there weren't any patrons on the list and close the screen before it is actually finished loading. It would be nice if there were some sort of visual indicator to show that it is still working.

Revision history for this message
Terran McCanna (tmccanna) wrote :

Confirming that this is still a problem in 2.12

Revision history for this message
Bill Erickson (berick) wrote :

We should integrate the progress bar from bug #1522638.

Revision history for this message
Bill Erickson (berick) wrote :

I also see the grid does not render anything until I select an org unit from the org selector. Is that the desired behavior?

Revision history for this message
Terran McCanna (tmccanna) wrote :

In the xul client, the system and consortium level org units are grayed out. It opens to the staff's default library and begins loading immediately. I think recreating this same behavior would be ideal.

Revision history for this message
Bill Erickson (berick) wrote :

Thanks, Terran. Looking closer, it may be failing for me due to a (possibly intermittent) org unit selector error. It looks like it's trying to load on startup, but failing during page render.

Revision history for this message
Terran McCanna (tmccanna) wrote :

I noticed that if I click the branch I want and wait, then click to another branch, then click back to the first branch, the list will usually be there. So, that makes sense that it is a problem during rendering.

Revision history for this message
Bill Erickson (berick) wrote :

2 commits pushed:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1642378-neg-balance-load-fail

1. Disable org units that cannot have users in the neg. balance UI. (The org selector does not appear to be styling the disabled values any differently, but I have confirmed they cannot be clicked on).

2. Various fixes to the org selector code. In short, this allows the neg. balance UI to automatically load the data for the selected org unit on page load, instead of dying on an undefined value error.

These commits do not add support for showing a progress dialog. I'm waiting until bug #1522638 is finalized before adding that.

======

More details from the org selector fixes. Some of these have been bugging me for a while, so I'm glad to get it sorted out:

1. Always apply default values after egStartup.go() has completed. Among other things, this prevents the occasional "cannot call ws_ou() on an undefined value" errors bubbling up from the org selector when an attempt to set default values occurred before egAuth had retrieved the user (which loads during startup).

2. For consistency, always run the $scope.onchange handler on initial page load when a selected value and change handler are defined. Similar to #1 above, the initial onchange always fires after egStartup has completed.

3. Run the change handler in a $timeout so that the $scope.selected value has a chance to propagate to the calling controller's $scope. Otherwise, the the calling controller has to manually track the selected value (which partially defeats the purpose of having this directive in the first place).

These changes could affect other interfaces using the org selector, particularly those that apply an onchange handler and allow for a default value. I did a review of these UI's and didn't see any unusual behavior, but extra eyes there is good. Mainly, we need to confirm that the page loads normally.

UI's potentially affected by the onchange differences:

admin/local/config/auto_print.tt2
admin/local/rating/badge.tt2
admin/local/rating/edit_badge.tt2
cat/catalog/t_holdings.tt2
cat/catalog/t_holds.tt2
circ/patron/t_edit.tt2
share/t_fm_record_editor.tt2

Revision history for this message
Terran McCanna (tmccanna) wrote :

Thanks Bill, works like a charm!

I have tested this code and consent to signing off on it with my name, Terran McCanna, and my email address, <email address hidden>.

tags: added: pullrequest signedoff
Revision history for this message
Bill Erickson (berick) wrote :

New branch pushed:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1642378-neg-balance-load-fail-progress

1. Rebased over the code from bug #1522638 to get the progress dialog.
2. Contains Terran's sign-offs for the first 2 commits for this bug.
3. Adds a 3rd commit for this bug to display the progress dialog while the neg. balance UI loads.

Once the code from bug #1522638 is merged, only the (3) LP#1642378-tagged commits from this branch will need to be merged.

summary: - Web Staff Client - Wish List - Patrons With Negative Balances Loading
+ Web Staff Client: Patrons With Negative Balances Loading
Changed in evergreen:
status: New → Confirmed
milestone: none → 2.12-rc
Revision history for this message
Kathy Lussier (klussier) wrote :

This looks good, but I'm getting a merge conflict on the branch in neg_balance_users.js and am not sure how to resolve it. Can you rebase it against current master?

Thanks!
Kathy

Revision history for this message
Bill Erickson (berick) wrote :
Revision history for this message
Kathy Lussier (klussier) wrote :

Thank you Bill and Terran! Merged to master for inclusion in 2.12RC

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.