[Koha-bugs] [Bug 30007] Make ->anonymize methods throw an exception if AnonymousPatron is not set

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 8 10:48:24 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30007

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #130177|0                           |1
        is obsolete|                            |

--- Comment #9 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 130274
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130274&action=edit
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 at davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=3007

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list