]> git.koha-community.org Git - koha.git/commit
Bug 29877: Make POST /holds handle maxreserves correctly
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 13 Jan 2022 15:10:30 +0000 (12:10 -0300)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Fri, 18 Mar 2022 02:34:52 +0000 (03:34 +0100)
commit8fdb91b6e318af90fefb64db9705dee9db17984e
treec482e376ae6e4f9496bcf663fe75eb45f2a294fd
parent2fa43197c1ffefabd9bce5c3d4909795580bdce0
Bug 29877: Make POST /holds handle maxreserves correctly

The current implementation doesn't consider the following values for the
syspref: undef and 0.

The tests mistakenly didn't cover them.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail, obvious warnings about comparing undefined values
         too.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. You can try on Postman as well
=> SUCCESS: Behavior is correct!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b002a84a2c6e5ee59562620b62bb21cfc7f61a02)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 19f3a58d4d57bc89017f22d3db640160142fe2dd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/REST/V1/Holds.pm