[Bug 11502] New: Branch filter in "Holds To Pull" is too fuzzy
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Bug ID: 11502 Summary: Branch filter in "Holds To Pull" is too fuzzy Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Currently, in the "Holds to Pull" list, the filter is too fuzzy/not exact enough. The Scenario: 1 - You have a hold on an item at branch NM 2 - You have a hold on an item at branch NMH 3 - You have a hold on an item at either branch NM, NA, NB Currently, if you filter by 'NM', you'll get all three holds to pull, even though you really only want holds 1 and 3. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 24047 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24047&action=edit Bug 11502 - Branch filter in "Holds To Pull" is too fuzzy This patch uses regex checking via the DataTables fnFilter API method to make the branch filter more precise on the "Holds to Pull" page. The ability to use regex is built into DataTables so this just adds the actual expression. _TEST PLAN_ Before applying: 1) Add library (branches) with codes of NM, NMH, and NB 2) Add items (that can be placed on hold) at all these branches 3) Place a hold on an item that is only available at NM 4) Place a hold on an item that is only available at NMH 5) Place a hold on an item that is only available at NM and NB 6) Go to "Holds to Pull" in the Circulation module 7) Filter by these three different values 8) Note that filtering by "NM" will incorrectly bring up all three holds, while "NMH" and "NB" will only pull up one (like they should). Apply the patch. 9) Shift+refresh the page so that your Javascript refreshes 10) Repeat step 7 (filtering by the different branch values) 11) Note that filtering by "NM" will now only bring up the hold for "NM" and the hold for "NM" and "NB", while the others still only bring up one hold. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24047|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 24048 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24048&action=edit Bug 11502 - Branch filter in "Holds To Pull" is too fuzzy This patch uses regex checking via the DataTables fnFilter API method to make the branch filter more precise on the "Holds to Pull" page. The ability to use regex is built into DataTables so this just adds the actual expression. _TEST PLAN_ Before applying: 1) Add library (branches) with codes of NM, NMH, and NB 2) Add items (that can be placed on hold) at all these branches 3) Place a hold on an item that is only available at NM 4) Place a hold on an item that is only available at NMH 5) Place a hold on an item that is only available at NM and NB 6) Go to "Holds to Pull" in the Circulation module 7) Filter by these three different values 8) Note that filtering by "NM" will incorrectly bring up all three holds, while "NMH" and "NB" will only pull up one (like they should). Apply the patch. 9) Shift+refresh the page so that your Javascript refreshes 10) Repeat step 7 (filtering by the different branch values) 11) Note that filtering by "NM" will now only bring up the hold for "NM" and the hold for "NM" and "NB", while the others still only bring up one hold. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Hi David, Could you explain why you match the < and >? The ^$ are not enough? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #3)
Hi David, Could you explain why you match the < and >? The ^$ are not enough?
Sure, Jonathan. It's because DataTables interprets all the data in a table cell as one long string. Sometimes, your string might be <td>BRANCH</td>. Other times, it might be <td>BRANCH<br/>BRANCH1<br/>BRANCH2</td>. If you were to only use ^$, 'BRANCH' would only match the first scenario. It wouldn't match the second, because the string ends with BRANCH2 - not BRANCH. However, we want it to match both scenarios, so we need to include < and >. In fact, there are 4 scenarios I see: 1) ^BRANCH$ (i.e. the string is only BRANCH) 2) ^BRANCH< (i.e. the string begins with BRANCH) 3) >BRANCH< (i.e. the string contains BRANCH in the middle somewhere) 4) >BRANCH$ (i.e. the string ends with BRANCH) Does that answer your question? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |jonathan.druart@biblibre.co |y.org |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to David Cook from comment #4)
Does that answer your question?
Yes, thanks David. Looking at the tt code, I seen that the cell contain 'reserveloo.holdingbranch', and I supposed it was a simple branch. But in fact, this field is built with a concat in the sql query. I should have read the test plan entirely... So the patch works great. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24048|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24272 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24272&action=edit Bug 11502 - Branch filter in "Holds To Pull" is too fuzzy This patch uses regex checking via the DataTables fnFilter API method to make the branch filter more precise on the "Holds to Pull" page. The ability to use regex is built into DataTables so this just adds the actual expression. _TEST PLAN_ Before applying: 1) Add library (branches) with codes of NM, NMH, and NB 2) Add items (that can be placed on hold) at all these branches 3) Place a hold on an item that is only available at NM 4) Place a hold on an item that is only available at NMH 5) Place a hold on an item that is only available at NM and NB 6) Go to "Holds to Pull" in the Circulation module 7) Filter by these three different values 8) Note that filtering by "NM" will incorrectly bring up all three holds, while "NMH" and "NB" will only pull up one (like they should). Apply the patch. 9) Shift+refresh the page so that your Javascript refreshes 10) Repeat step 7 (filtering by the different branch values) 11) Note that filtering by "NM" will now only bring up the hold for "NM" and the hold for "NM" and "NB", while the others still only bring up one hold. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, David! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m --- Comment #8 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Patch pushed to 3.14.x, will be in 3.14.5 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.12.x will be in 3.12.12 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11502 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12127 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org