]> git.koha-community.org Git - koha.git/commit
Bug 34024: Block changing pickup location for found holds
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 31 Jul 2023 17:26:01 +0000 (14:26 -0300)
committerPedro Amorim <pedro.amorim@ptfs-europe.com>
Mon, 28 Aug 2023 10:20:34 +0000 (10:20 +0000)
commitc46aa8af33728f63b3bf83deb1109dc76166bc1e
treef7e2502cb88fe21893b0ed0e9be98d7c7528c747
parent9ed11360d61b777ed33705e144badde902e8a96e
Bug 34024: Block changing pickup location for found holds

This patch adds a check on holds for 'found' statuses. Holds with the
following statuses have special workflows in Koha, and overwritting
their pickup locations yields uncertain scenarios:

* Waiting: the item has probably been put on a special shelve
* In transit: the item is travelling to a new destination, and changing
  the pickup location should include some validations, and probably
  generate some notifications. At least.
* In processing: the item has already been taken out of the shelve for
  some internal processing. Changing the pickup location could interfere
  with this workflow. Overriding this limitation could be introduced
  with care on a separate report.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests don't pass. Holds go through (200) instead of being
rejected (409).
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a1b5bd95341b81deec29493997e824c84849001e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6b2b54151f82d84efab611db25994bc10393dde3)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Koha/REST/V1/Holds.pm