If you create a group (admin/branches.pl) with no category code, attempting to delete will cause this software error: Can't call method "libraries" on an undefined value at /home/vagrant/kohaclone/admin/branches.pl line 197.
Created attachment 48978 [details] [review] Bug 16047: Making category code a required field on creating a group This will prevent users from creating a group without a category code, which causes a software error when you try to delete it To test: 1) Go to Admin -> Libraries and groups 2) Create new group without category code 3) Attempt to delete the group you just created and notice software error 4) Apply patch 5) Create new group without category code 6) Notice you now cannot save the group without putting in a category code Sponsored-by: Catalyst IT
Created attachment 49266 [details] [review] [SIGNED-OFF] Bug 16047: Making category code a required field on creating a group This will prevent users from creating a group without a category code, which causes a software error when you try to delete it To test: 1) Go to Admin -> Libraries and groups 2) Create new group without category code 3) Attempt to delete the group you just created and notice software error 4) Apply patch 5) Create new group without category code 6) Notice you now cannot save the group without putting in a category code Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 49267 [details] [review] Bug 16047 [Follow-up] Software error on deleting a group with no category code This follow-up take the original patch a little further, making category name required on the entry form as well. Without a category name there is no label in the interface when selecting a category. That doens't make any sense. Also changed on the group entry form: - Added "required" attribute to labels on required fields. - Changed "Update" submit button label to "Submit." - Added a "Cancel" link. - Added the "validated" class to the form so that our built-in validation script will process it (not strictly necessary but makes the validation appearance more consistent).
Created attachment 49268 [details] [review] Bug 16047 [Follow-up] Software error on deleting a group with no category code This follow-up take the original patch a little further, making category name required on the entry form as well. Without a category name there is no label in the interface when selecting a category. That doens't make any sense. Also changed on the group entry form: - Added "required" attribute to labels on required fields. - Changed "Update" submit button label to "Submit." - Added a "Cancel" link. - Added the "validated" class to the form so that our built-in validation script will process it (not strictly necessary but makes the validation appearance more consistent). Followed test plan, form displays and behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 49348 [details] [review] [PASSED QA] Bug 16047: Making category code a required field on creating a group This will prevent users from creating a group without a category code, which causes a software error when you try to delete it To test: 1) Go to Admin -> Libraries and groups 2) Create new group without category code 3) Attempt to delete the group you just created and notice software error 4) Apply patch 5) Create new group without category code 6) Notice you now cannot save the group without putting in a category code Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 49349 [details] [review] [PASSED QA] Bug 16047 [Follow-up] Software error on deleting a group with no category code This follow-up take the original patch a little further, making category name required on the entry form as well. Without a category name there is no label in the interface when selecting a category. That doens't make any sense. Also changed on the group entry form: - Added "required" attribute to labels on required fields. - Changed "Update" submit button label to "Submit." - Added a "Cancel" link. - Added the "validated" class to the form so that our built-in validation script will process it (not strictly necessary but makes the validation appearance more consistent). Followed test plan, form displays and behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to Master - Should be in the May 2016 release. Thanks!
Patches pushed to 3.22.x, will be in 3.22.6
Pushed to 3.22.x, will be in 3.20.11.