Bug 29780 - Add Koha::Old::Holds->anonymize
Summary: Add Koha::Old::Holds->anonymize
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 29525
  Show dependency treegraph
 
Reported: 2022-01-03 13:36 UTC by Tomás Cohen Arazi
Modified: 2022-12-12 21: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 29780: Unit tests (3.21 KB, patch)
2022-01-03 13:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29780: Add Koha::Old::Holds->anonymize (1.30 KB, patch)
2022-01-03 13:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29780: Unit tests (3.36 KB, patch)
2022-01-03 14:35 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29780: Add Koha::Old::Holds->anonymize (1.35 KB, patch)
2022-01-03 18:27 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29780: Unit tests (3.42 KB, patch)
2022-01-03 18:27 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29780: Add Koha::Old::Holds->anonymize (1.42 KB, patch)
2022-02-08 08:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29780: Unit tests (3.48 KB, patch)
2022-02-08 08:03 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-01-03 13:36:06 UTC
Add high-level methods to anonymize holds history as needed by bug 29526.
Comment 1 Tomás Cohen Arazi 2022-01-03 13:39:47 UTC
Created attachment 128964 [details] [review]
Bug 29780: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi 2022-01-03 13:39:50 UTC
Created attachment 128965 [details] [review]
Bug 29780: Add Koha::Old::Holds->anonymize

This patch adds a handy method for anonymizing a Koha::Old::Holds
resultset. It is planned to be used on bug 29526.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Old/Holds.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi 2022-01-03 14:35:35 UTC
Created attachment 128966 [details] [review]
Bug 29780: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi 2022-01-03 15:21:06 UTC
Just added some more tests, for the empty restultset case, which returns the weird '0E0' value instead of plain zero [1], and wanted to highlight it, as I stumbled upon it on bug 29526.

[1] https://stackoverflow.com/questions/13358793/why-does-dbis-do-method-return-0e0-if-zero-rows-were-affected
Comment 5 Lucas Gass 2022-01-03 18:27:04 UTC
Created attachment 128978 [details] [review]
Bug 29780: Add Koha::Old::Holds->anonymize

This patch adds a handy method for anonymizing a Koha::Old::Holds
resultset. It is planned to be used on bug 29526.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Old/Holds.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Lucas Gass 2022-01-03 18:27:10 UTC
Created attachment 128979 [details] [review]
Bug 29780: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 7 Martin Renvoize 2022-02-08 08:03:49 UTC
Created attachment 130252 [details] [review]
Bug 29780: Add Koha::Old::Holds->anonymize

This patch adds a handy method for anonymizing a Koha::Old::Holds
resultset. It is planned to be used on bug 29526.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Old/Holds.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2022-02-08 08:03:53 UTC
Created attachment 130253 [details] [review]
Bug 29780: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2022-02-08 08:04:27 UTC
A simple and clear patch that works as expected and contains thorough unit tests.

Passing QA
Comment 10 Fridolin Somers 2022-02-11 00:37:50 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄