[Bug 36329] New: Transfer limits should respect `BranchTransferLimitsType`
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 Bug ID: 36329 Summary: Transfer limits should respect `BranchTransferLimitsType` Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com CC: tomascohen@gmail.com The endpoint allows passing both a `collection code` and an `item type` on a batch request, but the UI would never allow such combination. I wonder if this is a design decision (i.e. supporting both in the future) or just a missing check. My intuition says it is the latter. I'm submitting a patch just in case. Kyle? -- 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=36329 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36277 CC| |kyle@bywatersolutions.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36277 [Bug 36277] t/db_dependent/api/v1/transfer_limits.t is failing -- 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=36329 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 163232 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163232&action=edit Bug 36329: Add missing return codes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 163233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163233&action=edit Bug 36329: Miscelaneous spec fixes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 163234 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163234&action=edit Bug 36329: Make POST /transfer_limits/batch honor BranchTransferLimitsType This patch adds tests for the different cases of `BranchTransferLimitsType`. It also adds tests for the situation of the consumer sending both limit criterias on the request. The controller gets adjusted for this new behavior and the spec gets documentation added about this. Bonus: tests are added the right guidelines code, and BranchTransferLimitsType gets mocked to avoid failures due to existing data. To test: 1. Apply this patches 2. Run: $ ktd --shell k$ qa => SUCCESS: All green, and tests pass! 3. 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=36329 David Nind <david@davidnind.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=36329 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163232|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 163280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163280&action=edit Bug 36329: Add missing return codes Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163233|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 163281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163281&action=edit Bug 36329: Miscelaneous spec fixes Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163234|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 163282 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163282&action=edit Bug 36329: Make POST /transfer_limits/batch honor BranchTransferLimitsType This patch adds tests for the different cases of `BranchTransferLimitsType`. It also adds tests for the situation of the consumer sending both limit criterias on the request. The controller gets adjusted for this new behavior and the spec gets documentation added about this. Bonus: tests are added the right guidelines code, and BranchTransferLimitsType gets mocked to avoid failures due to existing data. To test: 1. Apply this patches 2. Run: $ ktd --shell k$ qa => SUCCESS: All green, and tests pass! 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #7 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Tests pass before and after the patches are applied: prove t/db_dependent/api/v1/transfer_limits.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 Kyle M Hall <kyle@bywatersolutions.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=36329 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163280|0 |1 is obsolete| | Attachment #163281|0 |1 is obsolete| | Attachment #163282|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 163365 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163365&action=edit Bug 36329: Add missing return codes Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 163366 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163366&action=edit Bug 36329: Miscelaneous spec fixes Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 163367 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163367&action=edit Bug 36329: Make POST /transfer_limits/batch honor BranchTransferLimitsType This patch adds tests for the different cases of `BranchTransferLimitsType`. It also adds tests for the situation of the consumer sending both limit criterias on the request. The controller gets adjusted for this new behavior and the spec gets documentation added about this. Bonus: tests are added the right guidelines code, and BranchTransferLimitsType gets mocked to avoid failures due to existing data. To test: 1. Apply this patches 2. Run: $ ktd --shell k$ qa => SUCCESS: All green, and tests pass! 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.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=36329 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 163453 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163453&action=edit Bug 36329: (follow-up) Fix error message comparisson in testes 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=36329 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed the follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m Version(s)|24.05.00 |24.05.00,23.11.04 released in| | --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|24.05.00,23.11.04 |24.05.00,23.11.04,23.05.12 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36329 Bug 36329 depends on bug 36277, which changed state. Bug 36277 Summary: t/db_dependent/api/v1/transfer_limits.t is failing https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36277 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org