Bug 7266 - overdue.pl : filter on flags "debarred" "suspended" and "gonenoaddress" not working
Summary: overdue.pl : filter on flags "debarred" "suspended" and "gonenoaddress" not w...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 3.8
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Adrien SAURAT
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-25 10:33 UTC by Adrien SAURAT
Modified: 2013-12-05 20:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
patch (1.62 KB, patch)
2011-11-25 10:53 UTC, Adrien SAURAT
Details | Diff | Splinter Review
patch #2 (1.01 KB, patch)
2011-12-02 09:23 UTC, Adrien SAURAT
Details | Diff | Splinter Review
proposed patch (1.27 KB, patch)
2011-12-20 08:36 UTC, Adrien SAURAT
Details | Diff | Splinter Review
Bug 7266: flags debarred, suspended, gonenoaddress in overdue (1.32 KB, patch)
2011-12-20 08:54 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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
Restricted
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
Adrian

+    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.