Web client: Staff should be able to change the juvenile flag

Bug #1748006 reported by Blake GH on 2018-02-07
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Low
Unassigned
3.1
Low
Unassigned

Bug Description

EG 3.0.2

Once you select the date of birth for the patron in the patron edit/registration page, you cannot uncheck the juvenile flag when current time - birth date < "global.juvenile_age_threshold"

The interface should allow the staff to choose whatever they want regardless of the birth date. It is nice, however, to default the juvenile checkbox when the equation dictates.

Blake GH (bmagic) on 2018-02-07
tags: added: webstaffclient
Bill Erickson (berick) on 2018-02-09
Changed in evergreen:
status: New → Confirmed
Bill Erickson (berick) wrote :

The problem appears to be the dob (and expire_date) change handlers firing too aggressively (on all page interactions), which causes the juve flag to get reset each time. Looking at fixing that.

Resolving the overaggressive date change handlers should also cut down on the unnecessary page reload warnings.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Bill Erickson (berick) wrote :

Scratch my comment about the page reload warnings.

Fix pushed:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1748006-patron-edit-juvenile

From the commit:

Patch removes the ng-blur handler for dob and expire_date, which fires too aggressively. The dob handler is replaced with a $watch handler, so the new and old value can be compared. No watch is applied to expire_date, since no code is currently fired when it's changed.

Change the log level of the "field changed" message from log to debug.

To test:

[1] Open a patron in the web staff patron editor.
[2] Apply a juvenile birth date (less than 18 years by default).
[3] Confirm the juvenile flag is automatically activated (if it wasn't already).
[4] Confirm it's possible to un-check the juvenile flag and save the patron.

===

Note I tried a few changes to make eg-date-input less finicky about changes, but after a few rabbit holes lead to zero rabbits, I opted for the $watch option.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.0.4
assignee: Bill Erickson (berick) → nobody
Changed in evergreen:
milestone: 3.0.4 → 3.05
Changed in evergreen:
milestone: 3.0.5 → 3.0.6
Changed in evergreen:
milestone: 3.0.6 → 3.0.7
Changed in evergreen:
milestone: 3.0.7 → 3.0.8
Galen Charlton (gmc) on 2018-04-30
tags: added: signedoff
Changed in evergreen:
importance: Undecided → Low
Galen Charlton (gmc) wrote :

Pushed to master, rel_3_1, and rel_3_0. Thanks, Bill and Cesar!

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  Edit
Everyone can see this information.

Other bug subscribers