[Bug 30133] New: Incorrect list of libraries returned when more libraries than RESTdefaultPageSize and AllowHoldPolicyOverride enabled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Bug ID: 30133 Summary: Incorrect list of libraries returned when more libraries than RESTdefaultPageSize and AllowHoldPolicyOverride enabled Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com CC: tomascohen@gmail.com To recreate: 1 - Set AllowHoldPolicyOverride to allow 2 - Set RESTdefaultPageSize = 5 3 - Try to place a hold 4 - Note list is truncated and marked as needing override -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 130853 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130853&action=edit Bug 30133: Avoid calling c->objects->search twice Calling this twice sets double pagination headers, which messes up the page for the requests and retrieves on ly the end of the list This patch simply avoids a doulbe call TO DO: must implement same for Biblio->pickup_locations and cover with tests -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130853|0 |1 is obsolete| | --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 130854 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130854&action=edit Bug 30133: Avoid calling c->objects->search twice Calling this twice sets double pagination headers, which messes up the page for the requests and retrieves on ly the end of the list This patch simply avoids a doulbe call TO DO: must implement same for Biblio->pickup_locations and cover with tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130854|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 130855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130855&action=edit Bug 30133: Avoid calling c->objects->search twice Calling this twice sets double pagination headers, which messes up the page for the requests and retrieves on ly the end of the list This patch simply avoids a doulbe call TO DO: must implement same for Biblio->pickup_locations and cover with tests this also returns all as needing override -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 30126 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130855|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130883 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130883&action=edit Bug 30133: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130884&action=edit Bug 30133: Avoid calling c->objects->search twice Calling this twice sets double pagination headers, which messes up the page for the requests and retrieves on ly the end of the list This patch simply avoids a doulbe call TO DO: must implement same for Biblio->pickup_locations and cover with tests this also returns all as needing override Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130885 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130885&action=edit Bug 30133: Simplify code This patch simplifies the code, and also fixes a problem with branchcode comparisson failing, highlighted when running the tests To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => FAIL: Tests fail. Notably: - Link header pagination is wrong - X-*Total-Count headers have two values (dupicated) 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130883|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130884|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130885|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130886&action=edit Bug 30133: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130887&action=edit Bug 30133: Avoid calling c->objects->search twice Calling this twice sets double pagination headers, which messes up the page for the requests and retrieves on ly the end of the list This patch simply avoids a doulbe call TO DO: must implement same for Biblio->pickup_locations and cover with tests this also returns all as needing override Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130888&action=edit Bug 30133: Simplify code This patch simplifies the code, and also fixes a problem with branchcode comparisson failing, highlighted when running the tests To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => FAIL: Tests fail. Notably: - Link header pagination is wrong - X-*Total-Count headers have two values (dupicated) 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130889 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130889&action=edit Bug 30133: Fix pagination in /biblios/:bibio_id/pickup_locations This patch does the same thing we did for items on the previous patch, but for biblios. The tests are almost the same as well. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130886|0 |1 is obsolete| | --- Comment #12 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 130890 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130890&action=edit Bug 30133: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> https://bugs.koha-community.org/show_bug.cgi?id=30113 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130887|0 |1 is obsolete| | --- Comment #13 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 130891 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130891&action=edit Bug 30133: Avoid calling c->objects->search twice Calling this twice sets double pagination headers, which messes up the page for the requests and retrieves on ly the end of the list This patch simply avoids a doulbe call TO DO: must implement same for Biblio->pickup_locations and cover with tests this also returns all as needing override Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> https://bugs.koha-community.org/show_bug.cgi?id=30113 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130888|0 |1 is obsolete| | --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 130892 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130892&action=edit Bug 30133: Simplify code This patch simplifies the code, and also fixes a problem with branchcode comparisson failing, highlighted when running the tests To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => FAIL: Tests fail. Notably: - Link header pagination is wrong - X-*Total-Count headers have two values (dupicated) 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> https://bugs.koha-community.org/show_bug.cgi?id=30113 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130889|0 |1 is obsolete| | --- Comment #15 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 130893 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130893&action=edit Bug 30133: Fix pagination in /biblios/:bibio_id/pickup_locations This patch does the same thing we did for items on the previous patch, but for biblios. The tests are almost the same as well. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> https://bugs.koha-community.org/show_bug.cgi?id=30113 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Incorrect list of libraries |Pagination broken on |returned when more |pickup_location routes when |libraries than |AllowHoldPolicyOverride=1 |RESTdefaultPageSize and | |AllowHoldPolicyOverride | |enabled | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Pagination broken on |Pagination broken on |pickup_location routes when |pickup_locations routes |AllowHoldPolicyOverride=1 |when | |AllowHoldPolicyOverride=1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130890|0 |1 is obsolete| | Attachment #130891|0 |1 is obsolete| | Attachment #130892|0 |1 is obsolete| | Attachment #130893|0 |1 is obsolete| | --- Comment #16 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 130953 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130953&action=edit Bug 30133: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #17 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 130954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130954&action=edit Bug 30133: Avoid calling c->objects->search twice Calling this twice sets double pagination headers, which messes up the page for the requests and retrieves on ly the end of the list This patch simply avoids a doulbe call TO DO: must implement same for Biblio->pickup_locations and cover with tests this also returns all as needing override Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #18 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 130955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130955&action=edit Bug 30133: Simplify code This patch simplifies the code, and also fixes a problem with branchcode comparisson failing, highlighted when running the tests To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => FAIL: Tests fail. Notably: - Link header pagination is wrong - X-*Total-Count headers have two values (dupicated) 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #19 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 130956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130956&action=edit Bug 30133: Fix pagination in /biblios/:bibio_id/pickup_locations This patch does the same thing we did for items on the previous patch, but for biblios. The tests are almost the same as well. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130957&action=edit Bug 30133: (follow-up) Update objects.search POD Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #21 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Fridolin Somers from comment #21)
Pushed to master for 22.05, thanks to everybody involved 🦄
\o/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com Version(s)|22.05.00 |22.05.00,21.11.03 released in| | --- Comment #23 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00,21.11.03 |22.05.00,21.11.03,21.05.13 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #24 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #25 from Victor Grousset/tuxayo <victor@tuxayo.net> --- About backporting to 20.11.x, this depend on bug 27931, right? 20.11.x doesn't seem to have the route used in the tests so it shouldn't be affected at all. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30133 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #26 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Victor Grousset/tuxayo from comment #25)
About backporting to 20.11.x, this depend on bug 27931, right? 20.11.x doesn't seem to have the route used in the tests so it shouldn't be affected at all.
That's right! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org