[Bug 11630] New: AgeRestrictionMarker doesn't handle marker immediately followed by age
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Bug ID: 11630 Summary: AgeRestrictionMarker doesn't handle marker immediately followed by age Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: pasi.kallinen@pttk.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 24857 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24857&action=edit Make AgeRestrictionMarker consider "K16" In Finland the age restrictions are marked with letter K followed immediately by the age, eg. "K16". The AgeRestrictionMarker setting expects the marker and the age to be separated by space, eg. "PEGI 16" Attached patch improves the setting so it also considers the case where the marker is immediately followed by the age. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |pasi.kallinen@pttk.fi |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 26996 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26996&action=edit [SIGNED-OFF]Improve AgeRestrictionMarker to consider the case where the marker is immediately followed by the age, eg. "K16" in Finland. How I tested: Configure Age Restricition (see Syspref AgeRestrictionMarker) and have a biblio record with e.g. PEGI 99 in age restriction field Try to check out to a patron with age < 99 Check out should be blocked Change entry in age restriction field to PEGI99 Checkout should be possible Apply patch Checkout schould now be blocked Patch behaves as expected http://bugs.koha-community.org/show_bug.cgi?id=11630 Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24857|0 |1 is obsolete| | CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Marc Véron <veron@veron.ch> 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=11630 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |kyle@bywatersolutions.com --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Would it be too onerous a request to move the code for parsing the age restriction marker to a separate subroutine and add unit tests? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 --- Comment #3 from Marc Véron <veron@veron.ch> --- Kyle, I think it is a good idea to have a subroutine for the age restriction. Until now the code is used only at this place, but later we could expand the age restrictions e.g. to suppress titles in the catalogue if a kid is logged in etc. However, this is a small patch that makes an existing feature usable for Finland as well, and I can imagine that they need it immediately. That's why I kindly ask you to QA paxed's patch. In a next step we could open a bug to clean up the whole sub CanBookBeIssued in Circulation.pm (there is more functionality that could be moved in separate sbroutines). What do you think about? Thanks Marc -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 27089 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27089&action=edit Bug 11630 [QA Followup] - Move code to subroutine, add unit tests -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Kyle M Hall <kyle@bywatersolutions.com> 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=11630 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff CC| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Paxed, could you test and add your signoff to the Kyle's patch please? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 --- Comment #6 from Marc Véron <veron@veron.ch> --- Created attachment 27156 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27156&action=edit [Signed-off] Bug 11630 [QA Followup] - Move code to subroutine, add unit tests Patch behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27089|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Marc Véron <veron@veron.ch> 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=11630 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 27163 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27163&action=edit Improve AgeRestrictionMarker to consider the case where the marker is immediately followed by the age, eg. "K16" in Finland. How I tested: Configure Age Restricition (see Syspref AgeRestrictionMarker) and have a biblio record with e.g. PEGI 99 in age restriction field Try to check out to a patron with age < 99 Check out should be blocked Change entry in age restriction field to PEGI99 Checkout should be possible Apply patch Checkout schould now be blocked Patch behaves as expected http://bugs.koha-community.org/show_bug.cgi?id=11630 Signed-off-by: Marc Véron <veron@veron.ch> 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=11630 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 27164 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27164&action=edit Bug 11630 [QA Followup] - Move code to subroutine, add unit tests Patch behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> 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=11630 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 27165 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27165&action=edit Bug 11630: Unit tests can be independent of DB 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=11630 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26996|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27156|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Pasi! Thanks also to Kyle and Jonathan for working on the test cases. Nowadays, changes to routines in the C4 and Koha namespaces really ought to come with unit and/or regression tests. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olli-antti.kivilahti@jns.fi --- Comment #11 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Just rebasing our production branch to 3.16.x and wanted to thank you guys for your great work in getting this through! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11630 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13106 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org