Description
Jonathan Druart
2015-12-22 13:02:17 UTC
Created attachment 45906 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Created attachment 45907 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Created attachment 45908 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Created attachment 45909 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Note; tools/import_borrowers.pl and tools/modborrowers.pl have already been tested previously. Created attachment 45910 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). QA note: A false positive is raised by the qa script *** ERROR: Spurious =cut command at line 1021 in file C4/Members.pm It already exists before this patch set. I went through all tests with all patches applied, no problems found. Sorry, I missed one: In Batch patron deletion / anonymization I see a branch restricted category in the dropdown. Category restricted to Midway Staff meber's library is set to Centerville. With patches the category is visible in dropdown (should not) Removed patches - now the category is no longer visible (as expected) Created attachment 45913 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Created attachment 45914 [details] [review] :x Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). (In reply to Marc Véron from comment #8) > Sorry, I missed one: > > In Batch patron deletion / anonymization I see a branch restricted category > in the dropdown. > > Category restricted to Midway > Staff meber's library is set to Centerville. > > With patches the category is visible in dropdown (should not) > > Removed patches - now the category is no longer visible (as expected) Ho yes, the entire patch (replace GetBorrowercategoryList) was wrong actually. I have updated it, to use the search_limited instead of search method. Thanks for the catch! Created attachment 47098 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Created attachment 47099 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Created attachment 47100 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Created attachment 47101 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Created attachment 47102 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). patches rebased. Created attachment 47646 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Created attachment 47647 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Created attachment 47648 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Created attachment 47649 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Created attachment 47650 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). Just a rebase against master. Just a note: Testing, went through test plans from comment #1 and #2, both OK. #3 points 1-3 are OK Will later try to find time for more testing. Created attachment 47754 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Created attachment 47755 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Created attachment 47756 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Created attachment 47757 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Created attachment 47758 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). Patches rebased on top of bug 15629. Created attachment 50170 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Created attachment 50171 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Created attachment 50172 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Created attachment 50173 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Created attachment 50174 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). I have applied and tested the first 2 patches, they work well but when I get to the third I'm hitting Applying: Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory fatal: sha1 information is lacking or useless (tools/overduerules.pl). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Created attachment 52013 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Created attachment 52014 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Created attachment 52015 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). Created attachment 52032 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 52033 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 52034 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 52035 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 52036 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> *** Bug 16877 has been marked as a duplicate of this bug. *** perl -c reports/issues_stats.pl Global symbol "@patron_categories" requires explicit package name at reports/issues_stats.pl line 155. Global symbol "@patron_categories" requires explicit package name at reports/issues_stats.pl line 326. Global symbol "@patron_categories" requires explicit package name at reports/issues_stats.pl line 400. Bareword "GetBorrowercategoryList" not allowed while "strict subs" in use at reports/issues_stats.pl line 79 Created attachment 53419 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 53420 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 53421 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 53422 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 53423 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> (In reply to Kyle M Hall from comment #46) > perl -c reports/issues_stats.pl > Global symbol "@patron_categories" requires explicit package name at > reports/issues_stats.pl line 155. > Global symbol "@patron_categories" requires explicit package name at > reports/issues_stats.pl line 326. > Global symbol "@patron_categories" requires explicit package name at > reports/issues_stats.pl line 400. > Bareword "GetBorrowercategoryList" not allowed while "strict subs" in use at > reports/issues_stats.pl line 79 Hi Kyle, I do not recreate it, but I got a conflict on issues_stats.pl when applying the patches. I have rebased them against master. Created attachment 53892 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 54342 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 54343 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 54344 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 54345 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 54346 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> QA: OK Having another look Created attachment 54352 [details] [review] Bug 15407: [QA Follow-up] Fix POD in reserves_stats.pl Trivial fix. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> - my %cathash = ($line eq 'categorycode' or $column eq 'categorycode') ? &catcodes_hash : (); - push @loopfilter, {debug=>1, crit=>"\%cathash", filter=>join(", ", map {$cathash{$_}} sort keys %cathash)}; + my $patron_categories = Koha::Patron::Categories->search({}, {order_by => ['categorycode']}); + push @loopfilter, {debug=>1, crit=>"\%cathash", filter=>join(", ", map { $_->categorycode . ' (' . ( $_->description || 'NO_DESCRIPTION' ) . ')'} $patron_categories->as_list )}; You removed cathash, but left it in the push Created attachment 54353 [details] [review] Bug 15407: [QA Follow-up] Joubu, add your tests Trivial fix (yes again). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Please git grep on Categories.GetName Koha/Template/Plugin/Categories.pm:[% Categories.GetName( categorycode ) %]. koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc: koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt: Remove the pod and replace the three remaining calls please.. Created attachment 54355 [details] [review] Bug 15407: (follow-up) Koha::Patron::Categories - replace C4::Category->al Categories.GetName should not have been removed in the previous patch (merge conflict issue). Another thing :) perl t/db_dependent/Reserves.t 1..74 ok 1 - use C4::Reserves; Subroutine C4::Context::userenv redefined at t/db_dependent/Reserves.t line 45. ok 2 - CheckReserves Test 1 ok 3 - CheckReserves() include reserve_id in its response ok 4 - CheckReserves Test 2 ok 5 - CheckReserves Test 3 ok 6 - GetReservesControlBranch returns item home branch when set to ItemHomeLibrary ok 7 - GetReservesControlBranch returns patron home branch when set to PatronLibrary DBIx::Class::ResultSet::next(): [SQL::Abstract::__ANON__] Fatal: unexpected operator 'cancellationdate' with undef operand at /usr/share/koha/masterclone/Koha/Objects.pm line 168 # Looks like you planned 74 tests but ran 7. # Looks like your test exited with 255 just after 7. (In reply to Marcel de Rooy from comment #65) > Another thing :) > > perl t/db_dependent/Reserves.t > 1..74 > ok 1 - use C4::Reserves; > Subroutine C4::Context::userenv redefined at t/db_dependent/Reserves.t line > 45. > ok 2 - CheckReserves Test 1 > ok 3 - CheckReserves() include reserve_id in its response > ok 4 - CheckReserves Test 2 > ok 5 - CheckReserves Test 3 > ok 6 - GetReservesControlBranch returns item home branch when set to > ItemHomeLibrary > ok 7 - GetReservesControlBranch returns patron home branch when set to > PatronLibrary > DBIx::Class::ResultSet::next(): [SQL::Abstract::__ANON__] Fatal: unexpected > operator 'cancellationdate' with undef operand at > /usr/share/koha/masterclone/Koha/Objects.pm line 168 > # Looks like you planned 74 tests but ran 7. > # Looks like your test exited with 255 just after 7. Exsts on master, see bug 17115. Created attachment 54361 [details] [review] Bug 15407: Koha::Patron::Categories - remove sql queries in some pl and pm This patch replaces sql queries done in some pl script and in C4::Reports::Guided. Since we have now a Koha::Patron::Categories module, we should use it where it is possible. Test plan: - Prerequisite: Be sure you have several patron categories created, with different option enabled, and limit some to certain libraries. - On the 'Circulation and fine rules' admin page (admin/smart-rules.pl), all the patron categories should be displayed (even the ones limited to another library), ordered by description. Try to add/update existing rules. - On the overdue rules page (tools/overduerules.pl), all the patron categories with overduenoticerequired set should be displayed. Try to add/update existing rules. - On the following reports: reports/borrowers_stats.pl reports/issues_avg_stats.pl The patron categories should be displayed. Note that there is an inconsistency with these 2 reports: the patron categories limited to other libraries are displayed on them, when they are not on the other reports. This should certainly be fixed (on another bug report). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 54362 [details] [review] Bug 15407: Koha::Patron::Categories - replace C4::Category->all The C4::Category module contained only 1 method to return the patron categories available for the logged in user. The new method Koha::Patron::Categories->search_limited does exactly the same thing (see tests) and must be used in place of it. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. - On the 'Item circulation alerts' admin page (admin/item_circulation_alerts.pl), modify the settings for check-in and checkout (NOTE: Should not we display all patron categories on this page? If yes, it must be done in another bug report to ease backporting it). - Search for patrons in the admin (budget) and acquisition (order) module. - On the patron home page (search form in the header) Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 54363 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategory The purpose of C4::Members::GetBorrowercategory was to return the patron category for a given categorycode. This can be done easily with the Koha::Patron::Categories->find method. Test plan: - Same prerequisite as before - Edit a guarantor and confirm the information will be updated for his/her guarantee(s). - Update a child to adult patron (Note: Should not we hide the patron categories limited to others libraries? If yes, it must be done on another bug report). There is a special behavior if there is only 1 adult category, the user does not need to select a category. So the same as before with only 1 adult patron category. - Import a patron with a category_code which does not exist. You should be warned. - Modify some patron using the batch patron modification tool. The patron category descriptions should correctly be displayed. Note that the overduerules page has already been tested in a previous patch. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 54364 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetBorrowercategoryList C4::Members::GetBorrowercategoryList returned all the patron categories, ordered by description. This can be done using the search method of the Koha::Patron::Categories module. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by description. - On the "patron attribute types" admin page (admin/patron-attr-types.pl). - On the "Batch patron deletion/anonymization" (tools/cleanborrowers.pl), the dropdown list should be filled correctly. - On the import patron tool - On the following report: reports/reserves_stats.pl Confirm that the patron categories are displayed and that the report still works as before. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 54365 [details] [review] Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType This unnecessary complicated subroutine returned an arrayref and an hashref of the patron categories available for the logged in user, for a given category_type, ordered by categorycode. This can now be done with the search_limited method. Test plan: - Same prerequisite as before For the following pages, you should not see patron categories limited to other libraries. They should be ordered as before this patch, by categorycode. - Add/edit a patron, change his/her patron category value. - On the 3 following reports: reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl The display for these 3 reports are different than the 2 from the first patch (borrowers_stats.pl issues_avg_stats.pl): they are ordered by categorycode and the ones limited to other libraries are not displayed (should certainly be fixed). Note that the big part of this patch has already been tested before (update child related: CATCODE_MULTI). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 54366 [details] [review] Bug 15407: [QA Follow-up] Fix POD in reserves_stats.pl Trivial fix. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 54367 [details] [review] Bug 15407: [QA Follow-up] Joubu, add your tests Trivial fix (yes again). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 54368 [details] [review] Bug 15407: (follow-up) Koha::Patron::Categories - replace C4::Category->al Categories.GetName should not have been removed in the previous patch (merge conflict issue). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 54369 [details] [review] Bug 15407: [QA Follow-up] Confusing cathash removed One of the patches removed %cathash. Some kind of silly remainder was left in a string. Just used as a text field to explain the filters used on borrowers_stats.pl. The filter name cathash is not really easy and also was confusing in relation to the variable. So just a string patch, replacing it with Patron category. NOTE: The output of borrowers_stats.pl with the filters listed, is not one of the most beautiful Koha screens. Furthermore, translatibility of these filters is still an issue to be handled on another report. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> QA Comment: Code looks good to me. Tested selectively. Especially checked the code carefully; hard to test everything in limited time. With a quick push we will have some time before release to fix one or two things if needed. The number of follow-ups here shows that we already found some. Bonus points for the rest. Patch 3 It will probably work most of the time, but we assume often here that the find returned a record and access its columns rightaway without checking. Patch 4 admin/patron-attr-types.pl: Why collecting first in scalar context and later in list context ? Seeing no difference, just slightly inconsistent.. Passed QA Created attachment 54371 [details] [review] Bug 15407: Uniformise calls in patron-attr-types Does not make sense to call first in list context and later in scalar context. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (In reply to Marcel de Rooy from comment #76) > Patch 3 > It will probably work most of the time, but we assume often here that the > find returned a record and access its columns rightaway without checking. Yes, and it was almost the same before. Except that now the app will explode :) At least we able to catch if something is wrong elsewhere. But you are right, we need to focus on these calls. > Patch 4 > admin/patron-attr-types.pl: Why collecting first in scalar context and later > in list context ? Seeing no difference, just slightly inconsistent.. Fixed in last follow-up. > Passed QA Thanks! Pushed to master for 16.11, thanks Jonathan, Marcel! Bugs 14836 and 15629 being in 16.05 branch, is there any insensitive to backport this one? (In reply to Frédéric Demians from comment #80) > Bugs 14836 and 15629 being in 16.05 branch, is there any insensitive to > backport this one? It adds a lot of changes, so I would wait a couple of months (at least 1) before backporting it and see if it does not produce to many side effects. If there is no special need (hard conflicts), don't do it :) Created attachment 55517 [details] [review] Bug 15407: Remove 'No method selected!' warnings From reserves_stats.pl, there is no library pre-selected. (In reply to Jonathan Druart from comment #82) > Created attachment 55517 [details] [review] [review] > Bug 15407: Remove 'No method selected!' warnings > > From reserves_stats.pl, there is no library pre-selected. Followup pushed to master, thanks Jonathan! enhancement, passing for 16.05 |