denial of privileges not reported in SIP patron status field

Bug #849447 reported by Sarah Chodrow
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Galen Charlton
2.0
Fix Released
Undecided
Unassigned
2.1
Fix Released
Undecided
Unassigned

Bug Description

Evergreen version: at least 2.0.7 through current master.
OpenSRF version: 2.0 and 2.0.1
PostgreSQL version: 8.4, 9.0
Linux distribution: Ubuntu Lucid, Maverick
Test samples: any patron with (bills+fines) > $10.00 (Evergreen default) or with an expired card.

The SIP 24 (patron status) & 64 (patron info) responses do not correctly identify all patrons whose privileges have been denied in the 14 char patron status field (as opposed to the AF screen message field.)

Specifically, {branch}/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm:charge_ok() is used to set positions 0 (charge privileges denied), 1 (renewal privileges denied) and 3 (hold privileges denied) to Y only when the patron or card is active and not barred; it does not report cases where the patron's fines are too high or the patron card has expired in the patron status field.

My new Patron.pm, with modified charge_ok() is attached below. (Not really good with git yet--Patron.pm pulled from master as of 12 September 2011.)

Revision history for this message
Sarah Chodrow (sarah-chodrow) wrote :
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Sarah, could you add a Developer's Certificate of Origin as a comment on this bug, please?

You can find a template for one here:

http://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=DCO-1.1.txt;hb=HEAD

In the meantime, I'll make a git branch with your code modifications.

Jason

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Branchified:

For sharing lp849447 via the remote repo working:

You need only add the remote once, regardless of how many branches you wish to look at.
To add this repo as working:
 Read-only (git protocol):
  git remote add working git://git.evergreen-ils.org/working/Evergreen
 Read-write (ssh protocol):
  git remote add working <email address hidden>:working/Evergreen

Once you have the remote added you can check out this branch:
git co -b lp849447 working/collab/dyrcona/lp849447

Revision history for this message
Sarah Chodrow (sarah-chodrow) wrote :
Revision history for this message
Jason Stephenson (jstephenson) wrote :

After doing some more looking, I think Sarah's change is a good to go.

The only user penalties retrieved by the SIP code are those that block something: Circ, Hold, or renew. Presently, it seems that Evergreen only applies those that at least block circ. Since that is the case, I'm comfortable adding the pullrequest tag.

tags: added: pullrequest
Revision history for this message
Thomas Berezansky (tsbere) wrote :

Everything seems to work. Pushed to master.

Changed in evergreen:
status: New → Fix Committed
Galen Charlton (gmc)
Changed in evergreen:
status: Fix Committed → In Progress
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed a trivial stylistic patch to working/Evergreen.git, branch user/gmcharlt/lp849447

Revision history for this message
Mike Rylander (mrylander) wrote :

The original patch, and Galen's update, both pulled into master through 2.0. Thanks, Sarah and Galen!

Changed in evergreen:
status: In Progress → Fix Committed
Ben Shum (bshum)
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.