]> git.koha-community.org Git - koha.git/commit
Bug 30007: Make ->anonymize methods throw an exception if AnonymousPatron is not set
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 4 Feb 2022 11:15:06 +0000 (08:15 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 2 Mar 2022 08:47:47 +0000 (22:47 -1000)
commitc4e5e04f57f61ff11b7b3cfd9085e5e61722f97d
tree5dc6c74a40413bbbf58dff86fa60d74c82d9d62c
parent7ebeb58bfdbcbe78d23694af4af519ee804df250
Bug 30007: Make ->anonymize methods throw an exception if AnonymousPatron is not set

This patch makes the ->anonymize methods throw a
Koha::Exceptions::SysPref::NotSet exception when trying to anonymize
holds and checkouts without AnonymousPatron properly set.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Old/Checkouts.t \
           t/db_dependent/Koha/Old/Holds.t \
           t/db_dependent/Koha/Old/Hold.t
=> FAIL: Tests fail, no exception thrown
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
https://bugs.koha-community.org/show_bug.cgi?id=3007
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Old/Checkouts.pm
Koha/Old/Hold.pm
Koha/Old/Holds.pm