[Koha-bugs] [Bug 20028] Export all patron related personal data in one package
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Apr 21 21:54:34 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20028
Michal Denar <black23 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #119968|0 |1
is obsolete| |
Attachment #119969|0 |1
is obsolete| |
Attachment #119970|0 |1
is obsolete| |
Attachment #119972|0 |1
is obsolete| |
--- Comment #40 from Michal Denar <black23 at gmail.com> ---
Created attachment 119974
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119974&action=edit
Bug 20028: Add Koha::Patron->export
The logic behind gathering related data relies on DBIx relationships to
Borrower
source.
This patch does not care about object name terminology - it returns related
data
in a hashref containing keys of DBIx source class names, such as Borrower.
Return example:
{
"Borrower" => Koha::Patron,
"BorrowerMessagePreference" => DBIx::Class::ResultSet,
"ReturnClaim" => Koha::Checkouts::ReturnClaims
}
This has the benefit of giving caller the ability to format response as they
want. For example, you can then easily use the "unblessed" or "to_api"
representation of the object.
To test:
1. prove t/db_dependent/Koha/Patron.t
2. Observe success
Sponsored-by: The National Library of Finland
Signed-off-by: Michal Denar <black23 at gmail.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list