Bug 18965 - branch transfer limits pagination save bug
Summary: branch transfer limits pagination save bug
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 9430
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-20 14:08 UTC by Fridolin SOMERS
Modified: 2017-08-24 13:55 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18965 - branch transfer limits pagination save bug (1.63 KB, patch)
2017-07-21 09:18 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 18965 - branch transfer limits pagination save bug (1.69 KB, patch)
2017-07-21 11:56 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 18965 - branch transfer limits pagination save bug (1.75 KB, patch)
2017-07-21 12:58 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this 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 sandboxes@biblibre.com 2017-07-21 11:56:11 UTC
Patch tested with a sandbox, by Axelle Clarisse <axelle.clarisse@univ-amu.fr>
Comment 5 sandboxes@biblibre.com 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