Floody warnings were discovered during testing Koha. To reproduce what was discovered: 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Review error log, several warnings.
Created attachment 24106 [details] [review] Bug 11513 - Warnings in Patron categories TEST PLAN --------- 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Review error log, several warnings. 5) Apply patch 6) Refresh page 7) Review error log, no warnings.
Created attachment 24107 [details] [review] Bug 11513 - Warnings in Patron categories Just going to the patron categories page triggered errors. Running through all the plain options also triggered other warnings. This patch silences them. TEST PLAN --------- 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Click '+ New category' 5) Enter a dummy category and click 'Save' 6) Click 'Edit' for the dummy category. 7) Change a value and click 'Save' 8) Click 'Delete' for the dummy category. 9) Confirm to delete. 10) Review error log, several new warnings 11) Apply patch 12) Click 'Home' 13) Click 'Administration' 14) Click 'Patron categories' 15) Click '+ New category' 16) Enter a dummy category and click 'Save' 17) Click 'Edit' for the dummy category. 18) Change a value and click 'Save' 19) Click 'Delete' for the dummy category. 20) Confirm to delete. 21) Review error log, no new warnings
Created attachment 24164 [details] [review] Bug 11513 - Warnings in Patron categories Just going to the patron categories page triggered errors. Running through all the plain options also triggered other warnings. This fix silences them. This fix splits the admin/categorie.pl changes and the template changes, so that oldstable may be able to use this. TEST PLAN --------- 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Click '+ New category' 5) Enter a dummy category and click 'Save' 6) Click 'Edit' for the dummy category. 7) Change a value and click 'Save' 8) Click 'Delete' for the dummy category. 9) Confirm to delete. 10) Review error log, several new warnings 11) Apply patch 12) Click 'Home' 13) Click 'Administration' 14) Click 'Patron categories' 15) Click '+ New category' 16) Enter a dummy category and click 'Save' 17) Click 'Edit' for the dummy category. 18) Change a value and click 'Save' 19) Click 'Delete' for the dummy category. 20) Confirm to delete. 21) Review error log, no new warnings
Created attachment 24169 [details] [review] Bug 11513 - Warnings in Patron categories Just going to the patron categories page triggered errors. Running through all the plain options also triggered other warnings. This fix silences them. TEST PLAN --------- 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Click '+ New category' 5) Enter a dummy category and click 'Save' 6) Click 'Edit' for the dummy category. 7) Change a value and click 'Save' 8) Click 'Delete' for the dummy category. 9) Confirm to delete. 10) Review error log, several new warnings 11) Apply patch 12) Click 'Home' 13) Click 'Administration' 14) Click 'Patron categories' 15) Click '+ New category' 16) Enter a dummy category and click 'Save' 17) Click 'Edit' for the dummy category. 18) Change a value and click 'Save' 19) Click 'Delete' for the dummy category. 20) Confirm to delete. 21) Review error log, no new warnings
Still receiving these errors: [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl [Fri Jan 17 09:10:32 2014] [error] [client 127.0.0.1] [Fri Jan 17 09:10:32 2014] categorie.pl: Use of uninitialized value $enrolmentperioddate in string eq at /home/merllissia/koha/admin/categorie.pl line 248., referer: http://mykoha-intra.localhost/cgi-bin/koha/admin/categorie.pl
I can't verify the problem, but I can see how it happens. The revised patch should solve this.
Created attachment 24475 [details] [review] Bug 11513 - Warnings in Patron categories Just going to the patron categories page triggered errors. Running through all the plain options also triggered other warnings. This fix silences them. TEST PLAN --------- 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Click '+ New category' 5) Enter a dummy category and click 'Save' 6) Click 'Edit' for the dummy category. 7) Change a value and click 'Save' 8) Click 'Delete' for the dummy category. 9) Confirm to delete. 10) Review error log, several new warnings 11) Apply patch 12) Click 'Home' 13) Click 'Administration' 14) Click 'Patron categories' 15) Click '+ New category' 16) Enter a dummy category and click 'Save' 17) Click 'Edit' for the dummy category. 18) Change a value and click 'Save' 19) Click 'Delete' for the dummy category. 20) Confirm to delete. 21) Review error log, no new warnings
Created attachment 24476 [details] [review] Bug 11513 - perltidy, fix license, a couple other eyeball tweaks Since my single patch failed the QA tool because of tabs, I refactored the whole indentation using perltidy, corrected the license to the current one (http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence) and then tweaked a few things by eyeball.
Created attachment 24477 [details] [review] Bug 11513 - perltidy, fix license, a couple other eyeball tweaks Since my single patch failed the QA tool because of tabs, I refactored the whole indentation using perltidy, corrected the license to the current one (http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence) and then tweaked a few things by eyeball.
Created attachment 24478 [details] [review] Bug 11513 - perltidy, fix license, a couple other eyeball tweaks Since my single patch failed the QA tool because of tabs, I refactored the whole indentation using perltidy, corrected the license to the current one (http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence) and then tweaked a few things by eyeball.
Created attachment 24479 [details] [review] Bug 11513 - perltidy, fix license, a couple other eyeball tweaks Since my single patch failed the QA tool because of tabs, I refactored the whole indentation using perltidy, corrected the license to the current one (http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence) and then tweaked a few things by eyeball.
Created attachment 24480 [details] [review] Bug 11513 - perltidy, fix license, a couple other eyeball tweaks Since my single patch failed the QA tool because of tabs, I refactored the whole indentation using perltidy, corrected the license to the current one (http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence) and then tweaked a few things by eyeball.
Comment on attachment 24480 [details] [review] Bug 11513 - perltidy, fix license, a couple other eyeball tweaks Forget reindenting, fixing licensing, etc. Let's keep this simple.
Created attachment 24481 [details] [review] Bug 11513 - Warnings in Patron categories Just going to the patron categories page triggered errors. Running through all the plain options also triggered other warnings. This fix silences them. Discovered tabs I had not corrected by running qa test tool. Some errors which I could not trigger were also fixed, such as line 248 shown by Merllissia Manueli. TEST PLAN --------- 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Click '+ New category' 5) Enter a dummy category and click 'Save' 6) Click 'Edit' for the dummy category. 7) Change a value and click 'Save' 8) Click 'Delete' for the dummy category. 9) Confirm to delete. 10) Review error log, several new warnings 11) Apply patch 12) Run the koha qa test tool. 13) Click 'Home' 14) Click 'Administration' 15) Click 'Patron categories' 16) Click '+ New category' 17) Enter a dummy category and click 'Save' 18) Click 'Edit' for the dummy category. 19) Change a value and click 'Save' 20) Click 'Delete' for the dummy category. 21) Confirm to delete. 22) Review error log, no new warnings
Created attachment 24865 [details] [review] [SIGNED-OFF] Bug 11513 - Warnings in Patron categories Just going to the patron categories page triggered errors. Running through all the plain options also triggered other warnings. This fix silences them. Discovered tabs I had not corrected by running qa test tool. Some errors which I could not trigger were also fixed, such as line 248 shown by Merllissia Manueli. TEST PLAN --------- 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Click '+ New category' 5) Enter a dummy category and click 'Save' 6) Click 'Edit' for the dummy category. 7) Change a value and click 'Save' 8) Click 'Delete' for the dummy category. 9) Confirm to delete. 10) Review error log, several new warnings 11) Apply patch 12) Run the koha qa test tool. 13) Click 'Home' 14) Click 'Administration' 15) Click 'Patron categories' 16) Click '+ New category' 17) Enter a dummy category and click 'Save' 18) Click 'Edit' for the dummy category. 19) Change a value and click 'Save' 20) Click 'Delete' for the dummy category. 21) Confirm to delete. 22) Review error log, no new warnings Signed-off-by: Owen Leonard <oleonard@myacpl.org> Followed test plan, saw no errors in the log after applying the patch.
Enrolment is BE, Enrollment is AE But categorie sounds Dutch to me :) Just referring to script and column names here..
Created attachment 24931 [details] [review] Bug 11513 - Warnings in Patron categories Just going to the patron categories page triggered errors. Running through all the plain options also triggered other warnings. This fix silences them. Discovered tabs I had not corrected by running qa test tool. Some errors which I could not trigger were also fixed, such as line 248 shown by Merllissia Manueli. TEST PLAN --------- 1) Log in to staff client 2) Click 'Administration' 3) Click 'Patron categories' 4) Click '+ New category' 5) Enter a dummy category and click 'Save' 6) Click 'Edit' for the dummy category. 7) Change a value and click 'Save' 8) Click 'Delete' for the dummy category. 9) Confirm to delete. 10) Review error log, several new warnings 11) Apply patch 12) Run the koha qa test tool. 13) Click 'Home' 14) Click 'Administration' 15) Click 'Patron categories' 16) Click '+ New category' 17) Enter a dummy category and click 'Save' 18) Click 'Edit' for the dummy category. 19) Change a value and click 'Save' 20) Click 'Delete' for the dummy category. 21) Confirm to delete. 22) Review error log, no new warnings Signed-off-by: Owen Leonard <oleonard@myacpl.org> Followed test plan, saw no errors in the log after applying the patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested various dates and enrollment periods with different settings of dateformat pref. Works as advertised. No warnings.
Even the split on an empty string is thoroughly tested :) (I would have assumed that I got back the empty string, but perl keeps surprising..) Code looks good to me. Passed QA
Pushed to master, along with a follow-up that ensures that KohaDates is used for all occurrences of the enrollment end date. Thanks, Mark!
Patches pushed to 3.14.x, will be in 3.14.06
Pushed to 3.12.x will be in 3.12.13