Summary: | "Update child to adult patron" link no longer displayed | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Patrons | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | gmcharlt, kyle.m.hall, martin.renvoize, nick |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 20226 | ||
Bug Blocks: | |||
Attachments: |
Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link
Bug 22928: Add selenium tests Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link Bug 22928: Add selenium tests Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link Bug 22928: Add selenium tests |
Description
Jonathan Druart
2019-05-16 14:38:44 UTC
Created attachment 89851 [details] [review] 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 Created attachment 89862 [details] [review] Bug 22928: Add selenium tests Created attachment 89866 [details] [review] 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> Created attachment 89867 [details] [review] Bug 22928: Add selenium tests Signed-off-by: Liz Rea <wizzyrea@gmail.com> Created attachment 89899 [details] [review] 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> Created attachment 89900 [details] [review] Bug 22928: Add selenium tests Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Awesome work all! Pushed to master for 19.05 Bug with enhancement not in 18.11.x series. |