Web Client: Lost item renewal - COPY_NOT_AVAILABLE.override not consulted

Bug #1851434 reported by Josh Stompro on 2019-11-05
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Undecided
Unassigned
3.3
Undecided
Unassigned
3.4
Undecided
Unassigned

Bug Description

EG 3.3.4

In the 3.3.4 xul client, it is possible to renew an item with lost status from the patron items out screen if staff have the COPY_NOT_AVAILABLE.override permission.

In the 3.3.4 web client it isn't possible to renew an item with lost status.

It looks like in Open-ILS/web/js/ui/default/staff/circ/services/circ.js on line 88 there is an array of overridable events that doesn't include 'COPY_NOT_AVAILABLE'

https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/web/js/ui/default/staff/circ/services/circ.js;hb=7f92a4d509d9a04e0fa2928122bd1106014d4421#l87

Maybe it is just as simple as adding the status there?

We mark overdue items lost pretty quickly, about two weeks after being due, so it isn't unusual to get requests for renews of lost items for us.

I'll try out that fix.
Josh

That did seem to fix it for us

user/stompro/lp1851434_copy_not_available_renew
https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/stompro/lp1851434_copy_not_available_renew

Test Plan:
1. Check out an item to a patron.
2. Mark item lost by patron to change status to lost.
3. In web client, log in as user with COPY_NOT_AVAILABLE.override
4. Try to renew item for patron, see that it isn't allowed.

After fix:
1. Try to renew item for patron, see that the override is now allowed.

tags: added: pullrequest
Michele Morgan (mmorgan) wrote :

Marking this Confirmed and adding a reference to bug 1827901, which reports a similar inability to override another event:

PATRON_EXCEEDS_LONGOVERDUE_COUNT

The problem with overriding happens in Checkout as well as Renewal, so both lists of overrideable events in that file need the two additions:

PATRON_EXCEEDS_LONGOVERDUE_COUNT
COPY_NOT_AVAILABLE

Josh, would you like to modify your branch? I'll be happy to test.

Changed in evergreen:
status: New → Confirmed

Michele, after reading bug 1827901 I was a little worried that the fix was bypassing the .override permission, but I just double checked that when the permission is removed, the COPY_NOT_AVAILABLE override asks for a login of a user with the permission. So it seems like it does have the correct behavior.

I'll update my branch shortly.
Josh

Michele, I updated my branch with the PATRON_EXCEEDS_LONGOVERDUE_COUNT.

This doesn't address the question of why the events need to be hard coded in the web client, but not in the xul client, but it does allow things to work for these two situations.

Josh

Michele Morgan (mmorgan) wrote :

Josh, I certainly share your concern about why these events are hard coded. I created a new block in standing penalties and applied it to a patron, and there was no way to override it because of the hard coded events.

I'll give your branch a test for these two stock situations and open another bug about the hard coding.

Also, marking 1827901 as a duplicate since this branch should resolve that also.

Changed in evergreen:
assignee: nobody → Michele Morgan (mmorgan)
Michele Morgan (mmorgan) wrote :

Tested checkout and renewal for the two events PATRON_EXCEEDS_LONGOVERDUE_COUNT and COPY_NOT_AVAILABLE and a staff user with appropriate permission was able to override both events.

My signoff branch:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mmorgan/lp1851434_allow_overrides_signoff

Also opened a new bug to address the hard coding of overridable events, bug 1852316

Changed in evergreen:
assignee: Michele Morgan (mmorgan) → nobody
tags: added: signedoff
Changed in evergreen:
milestone: none → 3.5-alpha
Bill Erickson (berick) wrote :

Just a note about the implementation, overrideable events were also hard-coded in the XUL client.

Renewals for example:

https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/xul/staff_client/server/circ/util.js;h=c9b557e29da20e90c78ac01ae95b4e151498cbb3;hb=HEAD#l3866

Having said that, +1 to making them dynamic.

Reviewing fix...

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

Issue and fixes confirmed. Thanks Josh and Michele!

Merged to 3.3 and up.

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Bill Erickson (berick) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers