When creating a new patron category the branch limitations are not saved. When you edit a created patron category the limitations are saved correctly. To test: 1) Create a new patron category 2) Pick one or more libraries to limit to 3) Save and verify that the table of patron categories doesn't show your selected limitations.
This bug is still valid. The code for adding a branch limitations in admin/categorie.pl was only added for the update process, not the insert process. It wouldn't be difficult to add similar code for the insert process, but since that would mean adding *more* SQL to categorie.pl I'm not sure that would be accepted.
Hm I think fixing a bug should be ok, but I haven't taken a closer look. It would be nice to have a module for categories, but I think that would be a rewrite out of the scope of this bug.
Created attachment 37644 [details] [review] Bug 10011: Save branch limitations on creating a new patron category The code was just badly placed. It should be executed on update but also on insert. Test plan: 1/ Create a new patron category and select 1+ branch limitations 2/ Confirm it's correctly saved 3/ Edit it and change the branch limitations 4/ Confirm it's correctly saved
Created attachment 37673 [details] [review] Bug 10011: Save branch limitations on creating a new patron category The code was just badly placed. It should be executed on update but also on insert. Test plan: 1/ Create a new patron category and select 1+ branch limitations 2/ Confirm it's correctly saved 3/ Edit it and change the branch limitations 4/ Confirm it's correctly saved Signed-off-by: Mark Tompsett <mtompset@hotmail.com> NOTE: Not a C4 or Koha library, so tests not required. Though, this code could be cleaned up and have the DB stuff put into some sort of library with tests to prevent regression. However, that dream is beyond the scope of this bug.
Created attachment 37994 [details] [review] [PASSED QA] Bug 10011: Save branch limitations on creating a new patron category The code was just badly placed. It should be executed on update but also on insert. Test plan: 1/ Create a new patron category and select 1+ branch limitations 2/ Confirm it's correctly saved 3/ Edit it and change the branch limitations 4/ Confirm it's correctly saved Signed-off-by: Mark Tompsett <mtompset@hotmail.com> NOTE: Not a C4 or Koha library, so tests not required. Though, this code could be cleaned up and have the DB stuff put into some sort of library with tests to prevent regression. However, that dream is beyond the scope of this bug. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patch pushed to master. Thanks Jonathan!