[Bug 18635] New: Koha::Patron->guarantees() should return results alphabetically
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Bug ID: 18635 Summary: Koha::Patron->guarantees() should return results alphabetically Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Currently there is no sort here so patrons are returned in db order (unordered) We should return them alphabetically for display and other purposes -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 63552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63552&action=edit Bug 18635 - Unit tests To test: 1 - Apply this patch only 2 - Prove t/db_dependent/Patron.t 3 - Tests fail 4 - Apply other patch 5 - Tests pass -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 63553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63553&action=edit Bug 18635 - Koha::Patron->guarantees() should return results alphabetically To test: 1 - Add the same guarantor to a number of patrons, ensuring random order alphabetically 2 - View the guarantors record, note unordered list of guarantees 3 - Apply patch 4 - Guarantees are alphabetical -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63552|0 |1 is obsolete| | --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 63558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63558&action=edit Bug 18635 - Unit tests To test: 1 - Apply this patch only 2 - Prove t/db_dependent/Patron.t 3 - Tests fail 4 - Apply other patch 5 - Tests pass Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63553|0 |1 is obsolete| | --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 63559 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63559&action=edit Bug 18635 - Koha::Patron->guarantees() should return results alphabetically To test: 1 - Add the same guarantor to a number of patrons, ensuring random order alphabetically 2 - View the guarantors record, note unordered list of guarantees 3 - Apply patch 4 - Guarantees are alphabetical Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, tests for Koha::Patrons are in t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 63617 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63617&action=edit Bug 18635 - (QA followup) move tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sorry but it is t/db_dependent/Koha/Patrons.t, not t/db_dependent/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Should not we override Koha::Patrons->search instead? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63558|0 |1 is obsolete| | Attachment #63559|0 |1 is obsolete| | Attachment #63617|0 |1 is obsolete| | --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 66557 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66557&action=edit Bug 18635 - Koha::Patron->guarantees() should return results alphabetically To test: 1 - Add the same guarantor to a number of patrons, ensuring random order alphabetically 2 - View the guarantors record, note unordered list of guarantees 3 - Apply patch 4 - Guarantees are alphabetical Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 66558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66558&action=edit Bug 18635 - Unit tests To test: 1 - Apply this patch only 2 - Prove t/db_dependent/Patron.t 3 - Tests fail 4 - Apply other patch 5 - Tests pass Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #8)
Should not we override Koha::Patrons->search instead?
I am not sure, happy to have another opinion on this or make the change if you think it is necessary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Nick, What are you doing here?! Deleting tests without further notice? Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #12)
Nick, What are you doing here?! Deleting tests without further notice?
Failed QA
Which tests are missing? Maybe as_list, is it what you meant? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Nick, the first patch is removing t/db_dependent/Patrons.t. I think this is what Jonathan meant? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66557|0 |1 is obsolete| | Attachment #66558|0 |1 is obsolete| | --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77005&action=edit Bug 18635 - Koha::Patron->guarantees() should return results alphabetically To test: 1 - Add the same guarantor to a number of patrons, ensuring random order alphabetically 2 - View the guarantors record, note unordered list of guarantees 3 - Apply patch 4 - Guarantees are alphabetical Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77006&action=edit Bug 18635 - Unit tests To test: 1 - Apply this patch only 2 - Prove t/db_dependent/Patron.t 3 - Tests fail 4 - Apply other patch 5 - Tests pass Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #13)
(In reply to Marcel de Rooy from comment #12)
Nick, What are you doing here?! Deleting tests without further notice?
Failed QA
Which tests are missing? Maybe as_list, is it what you meant?
When I moved the tests I also deleted tests, that was an error, undone -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I do not think it was, tests in t/db_dependent/Patrons.t are pointless. Anyway, did you see that we already have a subtest for this method, in the same file? t/db_dependent/Koha/Patrons.t:subtest 'guarantees' => sub { -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77005|0 |1 is obsolete| | Attachment #77006|0 |1 is obsolete| | --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77011 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77011&action=edit Bug 18635 - Koha::Patron->guarantees() should return results alphabetically To test: 1 - Add the same guarantor to a number of patrons, ensuring random order alphabetically 2 - View the guarantors record, note unordered list of guarantees 3 - Apply patch 4 - Guarantees are alphabetical Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #20 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77012 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77012&action=edit Bug 18635 - Unit tests To test: 1 - Apply this patch only 2 - Prove t/db_dependent/Koha/Patrons.t 3 - Tests fail 4 - Apply other patch 5 - Tests pass Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77012|0 |1 is obsolete| | --- Comment #21 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77013 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77013&action=edit Bug 18635 - Unit tests I also adjust a few tests that assume value of $nb_of_patrons to not rely on existing datas To test: 1 - Apply this patch only 2 - Prove t/db_dependent/Koha/Patrons.t 3 - Tests fail 4 - Apply other patch 5 - Tests pass Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77011|0 |1 is obsolete| | Attachment #77013|0 |1 is obsolete| | --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 77435 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77435&action=edit Bug 18635: Koha::Patron->guarantees() should return results alphabetically To test: 1 - Add the same guarantor to a number of patrons, ensuring random order alphabetically 2 - View the guarantors record, note unordered list of guarantees 3 - Apply patch 4 - Guarantees are alphabetical Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 77436 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77436&action=edit Bug 18635: Unit tests I also adjust a few tests that assume value of $nb_of_patrons to not rely on existing datas To test: 1 - Apply this patch only 2 - Prove t/db_dependent/Koha/Patrons.t 3 - Tests fail 4 - Apply other patch 5 - Tests pass Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Fixed the commit messages. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #25 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Trivial enhancement which could be seen as a bugfix by many. Pushed to 18.05.x fro 18.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED --- Comment #27 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- UT patch does not apply easily, I prefer not push to 17.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #28 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Fridolin SOMERS from comment #27)
UT patch does not apply easily, I prefer not push to 17.11.x
It only adds a subtest (?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18635 --- Comment #29 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Ok I've managed to adapt UT. BTW the 1st patch was pushed with 17.11.10. UT patch will be in 17.11.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org