[Bug 25024] New: OPAC incorrectly marks branch as invalid pickup location when similarly named branch is blocked
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Bug ID: 25024 Summary: OPAC incorrectly marks branch as invalid pickup location when similarly named branch is blocked Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When you've got branches with similar branchcodes, the OPAC can get confused about which should be blocked by transfer limits. To test: - have a branch whose code contains the code for another branch, like "TOWN" and "TOWNSCHOOL" - Have a third branch with an unrealated code. I'll use "COUNTRY" - Have an item of item type BOOK, owned by branch COUNTRY - Set branch transfer limit to not allow BOOKs to go from COUNTRY to TOWNSCHOOL - confirm that no transfer limit exists for BOOKS from COUNTRY to TOWN - On staff client, confirm item allows hold for pickup at TOWN but not at TOWNSCHOOL - On OPAC, confirm hold is not allowed for pickup at TOWN or TOWNSCHOOL This seems to be the problematic bit of code: [% SET pickup_available_at = bibitemloo.not_available_at.grep(library.branchcode).size ? 0 : 1 %] So when we grep "TOWN" it also finds "TOWNSCHOOL," sees that block for TOWNSCHOOL, and applies it to TOWN in error. This has come to light as library systems deal with closures of some of their libraries due to coronavirus and start using branch transfer limits more intensively. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bwsdonna@gmail.com, | |kelly@bywatersolutions.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 102139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102139&action=edit Bug 25024: Make grep match full string To test: 1 - Create or have a branch with code CPL 2 - Create two new branches 'ACPL' and 'CPLA' 3 - In branch transfer limits disallow some itype or collection from another branch (FPL) to ACPL and CPLA 4 - Set UseBranchTransferLimits to 'Enforce' 5 - Find a biblio with one item belonging to FPL 6 - On opac, attempt to place a hold 7 - Note that ACPL and CPLA don't show in dropdown, OK 8 - Note that CPL is disabled, NOT OK 9 - Apply patch 10 - Place hold 11 - CPL is now enabled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102139|0 |1 is obsolete| | --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 102142 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102142&action=edit Bug 25024: Make grep match full string To test: 1 - Create or have a branch with code CPL 2 - Create two new branches 'ACPL' and 'CPLA' 3 - In branch transfer limits disallow some itype or collection from another branch (FPL) to ACPL and CPLA 4 - Set UseBranchTransferLimits to 'Enforce' 5 - Find a biblio with one item belonging to FPL 6 - On opac, attempt to place a hold 7 - Note that ACPL and CPLA don't show in dropdown, OK 8 - Note that CPL is disabled, NOT OK 9 - Apply patch 10 - Place hold 11 - CPL is now enabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Depends on| |17453 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17453 [Bug 17453] Inter-site holds improvement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, what about the existing syntax: koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt:[% show_marcfield = marcfield_tables.grep('^' _ tablename _ '$').size ? 1 : 0 %] The '^' _ var _ '$' seems more readable to me, don't you think? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102142|0 |1 is obsolete| | --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 102146 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102146&action=edit Bug 25024: Make grep match full string To test: 1 - Create or have a branch with code CPL 2 - Create two new branches 'ACPL' and 'CPLA' 3 - In branch transfer limits disallow some itype or collection from another branch (FPL) to ACPL and CPLA 4 - Set UseBranchTransferLimits to 'Enforce' 5 - Find a biblio with one item belonging to FPL 6 - On opac, attempt to place a hold 7 - Note that ACPL and CPLA don't show in dropdown, OK 8 - Note that CPL is disabled, NOT OK 9 - Apply patch 10 - Place hold 11 - CPL is now enabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102146|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 102177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102177&action=edit Bug 25024: Make grep match full string To test: 1 - Create or have a branch with code CPL 2 - Create two new branches 'ACPL' and 'CPLA' 3 - In branch transfer limits disallow some itype or collection from another branch (FPL) to ACPL and CPLA 4 - Set UseBranchTransferLimits to 'Enforce' 5 - Find a biblio with one item belonging to FPL 6 - On opac, attempt to place a hold 7 - Note that ACPL and CPLA don't show in dropdown, OK 8 - Note that CPL is disabled, NOT OK 9 - Apply patch 10 - Place hold 11 - CPL is now enabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 102178 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102178&action=edit Bug 25024: Do not escape $ Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The test plan should have contained testing OPACHoldsIfAvailableAtPickup to be complete. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Version(s)|20.05.00 |20.05.00, 19.11.06 released in| | Status|Pushed to master |Pushed to stable --- Comment #9 from Joy Nelson <joy@bywatersolutions.com> --- rebased (thanks nick) and backported to 19.11.x for 19.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25024 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00, 19.11.06 |20.05.00, 19.11.06, released in| |19.05.11 Status|Pushed to stable |Pushed to oldstable CC| |lucas@bywatersolutions.com --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org