Bug 18965

Summary: branch transfer limits pagination save bug
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: System AdministrationAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: axelle.clarisse, gmcharlt, katrin.fischer, mtj, sandboxes
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 9430    
Bug Blocks:    
Attachments: Bug 18965 - branch transfer limits pagination save bug
Bug 18965 - branch transfer limits pagination save bug
Bug 18965 - branch transfer limits pagination save bug

Description Fridolin Somers 2017-07-20 14:08:13 UTC
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.
Comment 1 Fridolin Somers 2017-07-21 09:18:54 UTC
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
Comment 2 Fridolin Somers 2017-07-21 09:26:24 UTC
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.
Comment 3 Fridolin Somers 2017-07-21 09:28:48 UTC
(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.
Comment 4 Biblibre Sandboxes 2017-07-21 11:56:11 UTC
Patch tested with a sandbox, by Axelle Clarisse <axelle.clarisse@univ-amu.fr>
Comment 5 Biblibre Sandboxes 2017-07-21 11:56:32 UTC
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>
Comment 6 Nick Clemens 2017-07-21 12:58:03 UTC
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>
Comment 7 Jonathan Druart 2017-07-24 19:04:54 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin Somers 2017-07-31 07:59:10 UTC
Pushed to 17.05.x, will be in 17.05.03.
Comment 9 Katrin Fischer 2017-08-01 05:42:38 UTC
This patch has been pushed to 16.11.x and will be in 16.11.11.
Comment 10 Mason James 2017-08-24 13:55:26 UTC
Pushed to 16.05.x, for 16.05.16 release