[Bug 22928] New: "Update child to adult patron" link no longer displayed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 Bug ID: 22928 Summary: "Update child to adult patron" link no longer displayed Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: Patrons Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Depends on: 20226 Target Milestone: --- Looks like it is caused by bug 20226, however I am pretty sure it works when I wrote the patch. [% IF Categories.scalar.all(category_type => 'A').count > 0 %] is always wrong Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20226 [Bug 20226] Get rid of CATCODE_MULTI param decision in patron perl scripts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89851 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89851&action=edit Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link Looks like it is caused by bug 20226, however I am pretty sure it works when I wrote the patch. [% IF Categories.scalar.all(category_type => 'A').count > 0 %] is always wrong. It must be, either: [% IF Categories.all(category_type => 'A').size > 0 %] or [% SET adult_categories = Categories.scalar.all(category_type => 'A') %] [% IF adult_categories.count > 0 %] In the first case we are getting an array whereas in the later, a Koha::Patrons which is preferable. Test plan (from 20226): - Remove all your adult categories (categories.category_type='A') - Create a patron with a child category - Try to update to adult category => The entry does no longer appears! (This is a change in the behaviour) - Create one adult category - Update to adult category => There is a JS confirmation message, if you accept the patron will be updated to the adult category - Create (at least) another adult category - Create another child - Update to adult category => No more confirmation message but a popup to select the adult category - Pick one => The patron has been updated to the adult category -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_19_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89862&action=edit Bug 22928: Add selenium tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 Liz Rea <wizzyrea@gmail.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=22928 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89851|0 |1 is obsolete| | Attachment #89862|0 |1 is obsolete| | --- Comment #3 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 89866 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89866&action=edit Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link Looks like it is caused by bug 20226, however I am pretty sure it works when I wrote the patch. [% IF Categories.scalar.all(category_type => 'A').count > 0 %] is always wrong. It must be, either: [% IF Categories.all(category_type => 'A').size > 0 %] or [% SET adult_categories = Categories.scalar.all(category_type => 'A') %] [% IF adult_categories.count > 0 %] In the first case we are getting an array whereas in the later, a Koha::Patrons which is preferable. Test plan (from 20226): - Remove all your adult categories (categories.category_type='A') - Create a patron with a child category - Try to update to adult category => The entry does no longer appears! (This is a change in the behaviour) - Create one adult category - Update to adult category => There is a JS confirmation message, if you accept the patron will be updated to the adult category - Create (at least) another adult category - Create another child - Update to adult category => No more confirmation message but a popup to select the adult category - Pick one => The patron has been updated to the adult category Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 --- Comment #4 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 89867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89867&action=edit Bug 22928: Add selenium tests Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 Kyle M Hall <kyle@bywatersolutions.com> 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=22928 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89866|0 |1 is obsolete| | Attachment #89867|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 89899 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89899&action=edit Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link Looks like it is caused by bug 20226, however I am pretty sure it works when I wrote the patch. [% IF Categories.scalar.all(category_type => 'A').count > 0 %] is always wrong. It must be, either: [% IF Categories.all(category_type => 'A').size > 0 %] or [% SET adult_categories = Categories.scalar.all(category_type => 'A') %] [% IF adult_categories.count > 0 %] In the first case we are getting an array whereas in the later, a Koha::Patrons which is preferable. Test plan (from 20226): - Remove all your adult categories (categories.category_type='A') - Create a patron with a child category - Try to update to adult category => The entry does no longer appears! (This is a change in the behaviour) - Create one adult category - Update to adult category => There is a JS confirmation message, if you accept the patron will be updated to the adult category - Create (at least) another adult category - Create another child - Update to adult category => No more confirmation message but a popup to select the adult category - Pick one => The patron has been updated to the adult category Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 89900 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89900&action=edit Bug 22928: Add selenium tests Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Bug with enhancement not in 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org