In branch transfer limits, tables are paginated with 10 rows by default. The bug is that datatable not only hides rows, they are not in form. So when submitting form, rows not visible are erased.
Created attachment 65161 [details] [review] Bug 18965 - branch transfer limits pagination save bug In branch transfer limits, tables are paginated with 20 rows by default. The bug is that datatable not only hides rows, they are not in form. So when submitting form, rows not visible are erased. Test plan : Wihout patch : - Create 22 branches, you can hack the creation form by manualling calling URL : /cgi-bin/koha/admin/branches.pl?op=add_validate&branchcode=Bxx&branchname=Bxx - Go to Administration > Library transfer limits - You see table first page : only 20 first rows are shown - You see all checkboxes are checked - Go to second page of this table - Save => You see table first page with all checkboxes unchecked With patch the is no pagination, all checkboxes are shown when you save
On can still use search and when saving erase all rows. But its more difficult to correct. I think this page should be changed to show a big table with itemtype/ccode, branch and checkbox columns. With column filters to allow searching. And when a filter is used, Javascript code must disable the "Save" button. This whould also allow really (un)checking all checkboxes.
(In reply to Fridolin SOMERS from comment #0) > In branch transfer limits, tables are paginated with 10 rows by default. > > The bug is that datatable not only hides rows, they are not in form. > So when submitting form, rows not visible are erased. The patch simply removes pagination because I think libraries mostly have less than 20 branches, and none have more than 100, so the table will never be huge.
Patch tested with a sandbox, by Axelle Clarisse <axelle.clarisse@univ-amu.fr>
Created attachment 65175 [details] [review] Bug 18965 - branch transfer limits pagination save bug In branch transfer limits, tables are paginated with 20 rows by default. The bug is that datatable not only hides rows, they are not in form. So when submitting form, rows not visible are erased. Test plan : Wihout patch : - Create 22 branches, you can hack the creation form by manualling calling URL : /cgi-bin/koha/admin/branches.pl?op=add_validate&branchcode=Bxx&branchname=Bxx - Go to Administration > Library transfer limits - You see table first page : only 20 first rows are shown - You see all checkboxes are checked - Go to second page of this table - Save => You see table first page with all checkboxes unchecked With patch the is no pagination, all checkboxes are shown when you save Signed-off-by: Axelle Clarisse <axelle.clarisse@univ-amu.fr>
Created attachment 65180 [details] [review] Bug 18965 - branch transfer limits pagination save bug In branch transfer limits, tables are paginated with 20 rows by default. The bug is that datatable not only hides rows, they are not in form. So when submitting form, rows not visible are erased. Test plan : Wihout patch : - Create 22 branches, you can hack the creation form by manualling calling URL : /cgi-bin/koha/admin/branches.pl?op=add_validate&branchcode=Bxx&branchname=Bxx - Go to Administration > Library transfer limits - You see table first page : only 20 first rows are shown - You see all checkboxes are checked - Go to second page of this table - Save => You see table first page with all checkboxes unchecked With patch the is no pagination, all checkboxes are shown when you save Signed-off-by: Axelle Clarisse <axelle.clarisse@univ-amu.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.03.
This patch has been pushed to 16.11.x and will be in 16.11.11.
Pushed to 16.05.x, for 16.05.16 release