Bug 30023 - Add Koha::Old::Checkout->anonymize
Summary: Add Koha::Old::Checkout->anonymize
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 30007
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-04 11:39 UTC by Tomás Cohen Arazi
Modified: 2022-03-04 13:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30023: Add Koha::Old::Checkout->anonymize (4.39 KB, patch)
2022-02-04 14:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30023: Make MarkIssueReturned use ->anonymize (3.46 KB, patch)
2022-02-04 14:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30023: Add Koha::Old::Checkout->anonymize (4.44 KB, patch)
2022-02-04 19:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 30023: Make MarkIssueReturned use ->anonymize (3.51 KB, patch)
2022-02-04 19:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 30023: Add Koha::Old::Checkout->anonymize (4.50 KB, patch)
2022-02-08 10:00 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30023: Make MarkIssueReturned use ->anonymize (3.57 KB, patch)
2022-02-08 10:00 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2022-02-04 11:39:42 UTC
Not sure why, but I forgot to add this method earlier on the bug tree. Needed for consistency and completion of the refactoring.
Comment 1 Tomás Cohen Arazi 2022-02-04 14:09:43 UTC
Created attachment 130161 [details] [review]
Bug 30023: Add Koha::Old::Checkout->anonymize

This patch adds the mentioned method. It replicates the Koha::Old::Hold
behavior, including the exception thrown on bad configuration.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Old/Checkout.t
=> SUCCESS: Test pass
3. Sign off :-D
Comment 2 Tomás Cohen Arazi 2022-02-04 14:09:49 UTC
Created attachment 130162 [details] [review]
Bug 30023: Make MarkIssueReturned use ->anonymize

Koha::Old::Checkout->anonymize takes care of checking the syspref and
raises an exception if not set. So no we can now leverage on it, instead
of checking manually and then tweaking the checkout object manually as
well.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Comment 3 David Nind 2022-02-04 19:43:22 UTC
Created attachment 130178 [details] [review]
Bug 30023: Add Koha::Old::Checkout->anonymize

This patch adds the mentioned method. It replicates the Koha::Old::Hold
behavior, including the exception thrown on bad configuration.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Old/Checkout.t
=> SUCCESS: Test pass
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2022-02-04 19:43:26 UTC
Created attachment 130179 [details] [review]
Bug 30023: Make MarkIssueReturned use ->anonymize

Koha::Old::Checkout->anonymize takes care of checking the syspref and
raises an exception if not set. So no we can now leverage on it, instead
of checking manually and then tweaking the checkout object manually as
well.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Martin Renvoize 2022-02-08 10:00:51 UTC
Created attachment 130277 [details] [review]
Bug 30023: Add Koha::Old::Checkout->anonymize

This patch adds the mentioned method. It replicates the Koha::Old::Hold
behavior, including the exception thrown on bad configuration.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Old/Checkout.t
=> SUCCESS: Test pass
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2022-02-08 10:00:54 UTC
Created attachment 130278 [details] [review]
Bug 30023: Make MarkIssueReturned use ->anonymize

Koha::Old::Checkout->anonymize takes care of checking the syspref and
raises an exception if not set. So no we can now leverage on it, instead
of checking manually and then tweaking the checkout object manually as
well.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2022-02-08 10:02:09 UTC
All works as designed and clarifies the code.  Tested, and QA scripts happy.

Passing QA
Comment 8 Fridolin Somers 2022-03-02 08:49:06 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄