Summary: | Error when updating child to adult patron on system with only one adult patron category | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Patrons | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, gmcharlt, kyle.m.hall, m.de.rooy, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 15407 | ||
Bug Blocks: | 19641, 20903 | ||
Attachments: |
Bug 19921: Fix update child when only one adult patron category exist
Bug 19921: Fix update child when only one adult patron category exist Bug 19921: Fix update child when only one adult patron category exist |
Description
Owen Leonard
2018-01-05 18:01:09 UTC
Caused by commit cae4b980607be083e5e0fb163c4949c73d6347db Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType Created attachment 70313 [details] [review] Bug 19921: Fix update child when only one adult patron category exist We are passing the Koha::Patron::Category object to the template instead of the categorycode. To reproduce this bug you must test in a system which has only one patron category of the "adult" type. View the details of a patron with a child-type patron category and choose More -> Update child to adult patron. This results in an error: Can't call method "category_type" on an undefined value at /home/vagrant/kohaclone/members/update-child.pl line 84. The URL of the error page shows a problem with the parameters being passed: members/update-child.pl?op=update&borrowernumber=12345&catcode=Koha::Patron::Category=HASH(0xa168a18)&catcode_multi= Test plan: Make sure you have only 1 adult patron category Update a child to adult => With this patch applied the error is gone and the patron has been correctly updated Created attachment 70340 [details] [review] Bug 19921: Fix update child when only one adult patron category exist We are passing the Koha::Patron::Category object to the template instead of the categorycode. To reproduce this bug you must test in a system which has only one patron category of the "adult" type. View the details of a patron with a child-type patron category and choose More -> Update child to adult patron. This results in an error: Can't call method "category_type" on an undefined value at /home/vagrant/kohaclone/members/update-child.pl line 84. The URL of the error page shows a problem with the parameters being passed: members/update-child.pl?op=update&borrowernumber=12345&catcode=Koha::Patron::Category=HASH(0xa168a18)&catcode_multi= Test plan: Make sure you have only 1 adult patron category Update a child to adult => With this patch applied the error is gone and the patron has been correctly updated Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 70448 [details] [review] Bug 19921: Fix update child when only one adult patron category exist We are passing the Koha::Patron::Category object to the template instead of the categorycode. To reproduce this bug you must test in a system which has only one patron category of the "adult" type. View the details of a patron with a child-type patron category and choose More -> Update child to adult patron. This results in an error: Can't call method "category_type" on an undefined value at /home/vagrant/kohaclone/members/update-child.pl line 84. The URL of the error page shows a problem with the parameters being passed: members/update-child.pl?op=update&borrowernumber=12345&catcode=Koha::Patron::Category=HASH(0xa168a18)&catcode_multi= Test plan: Make sure you have only 1 adult patron category Update a child to adult => With this patch applied the error is gone and the patron has been correctly updated Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed to master for 18.05, thanks to everybody involved! Awesome work all! Pushed to Stable for 17.11.02 Pushed to 17.05.x for v17.05.09 |