Bug 7266

Summary: overdue.pl : filter on flags "debarred" "suspended" and "gonenoaddress" not working
Product: Koha Reporter: Adrien SAURAT <adrien.saurat>
Component: CirculationAssignee: Adrien SAURAT <adrien.saurat>
Status: CLOSED FIXED QA Contact: Ian Walls <koha.sekjal>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, gmcharlt, katrin.fischer, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: patch
patch #2
proposed patch
Bug 7266: flags debarred, suspended, gonenoaddress in overdue

Description Adrien SAURAT 2011-11-25 10:33:03 UTC
When looking for overdues, the combobox "Patron flags" has no effect.
Three values are available in the list:
Address in question
Lost card

None of this works (empty result) as the code currently assumes that these filters work with the "flags" field in the database. Actually, the form value should be compared instead with the contents of the gonenoaddress, debarred and lost fields.

"Address in question" should filter by: gonenoaddress TRUE
"Restricted" should filter by: debarred date >= current date
"Lost card" should filter by: lost TRUE
Comment 1 Adrien SAURAT 2011-11-25 10:53:26 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2011-12-01 19:16:31 UTC

+    elsif ( $borflagsfilter eq 'lost') {
+        $strsth .= " AND borrowers.debarred <> 0";
+    }

Shouldn't that be checking lost not debarred?
Comment 3 Adrien SAURAT 2011-12-02 09:23:27 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2011-12-02 16:11:31 UTC
The first patch does not apply for me. Tried with git bz apply and git am -i3u.

Applying: Bug 7266: filter on "Patron flags" in overdue.pl
error: patch failed: circ/overdue.pl:266
error: circ/overdue.pl: patch does not apply
Patch failed at 0001 Bug 7266: filter on "Patron flags" in overdue.pl

If you can rebase this against current master, can you please also squash the two patches together? Thanks.
Comment 5 Adrien SAURAT 2011-12-20 08:36:45 UTC Comment hidden (obsolete)
Comment 6 Chris Cormack 2011-12-20 08:54:05 UTC
Created attachment 6886 [details] [review]
Bug 7266: flags debarred, suspended, gonenoaddress in overdue

This patch makes these flags functionnal.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 7 Paul Poulain 2012-01-17 17:04:43 UTC
QA comment: small patch, perlcritic compliant, passed QA.

Won't work for 3.6, as it relies on fine in days
Comment 8 Jared Camins-Esakov 2012-12-31 00:31:43 UTC
There have been no further reports of problems so I am marking this bug resolved.