Add high-level methods to anonymize holds history as needed by bug 29526.
Created attachment 128964 [details] [review] Bug 29780: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
Created attachment 128966 [details] [review] Bug 29780: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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
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>
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>
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>
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>
A simple and clear patch that works as expected and contains thorough unit tests. Passing QA
Pushed to master for 22.05, thanks to everybody involved [U+1F984]