]> git.koha-community.org Git - koha.git/commit
Bug 29525: Make Koha::Hold->fill anonymize if required
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 13 Jan 2022 17:40:04 +0000 (14:40 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 11 Feb 2022 00:44:22 +0000 (14:44 -1000)
commit4c2f4a302e78e253dcf8e47cdbbc8d8fe8c287e1
tree5a85122296684eb1488ab628ee9e176a94fe751b
parent2f3926965f846f507f233dc552fb032301d35536
Bug 29525: Make Koha::Hold->fill anonymize if required

This patch makes filling a hold anonymize it on the same call, if
settings require it (i.e. if borrowers.privacy is set to 2).

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: The code actually does what it is meant to
3. Try on the UI, notice it gets anonymized if the patron has privacy == always/2.
4. Sign off :-D

Note: AnonymousPatron should be set. Otherwise it would set NULL. But
that's fine, that's what Koha does already.

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>
Koha/Hold.pm
t/db_dependent/Koha/Hold.t