[Bug 19926] New: Add the Koha::Object->unblessed_all_relateds method
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Bug ID: 19926 Summary: Add the Koha::Object->unblessed_all_relateds method Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org In order to refactor our legacy code step-by-step, we will need to provide code with the exact same behaviors and then improve it. The same idea appears for the TT syntax for notices: we will want to deprecate the existing syntax in order to support only one syntax. Currently we fetch all the values from the related tables, without knowing which are actually used. I am suggestion to introduce a Koha::Object->unblessed_all_relateds method which will return a hash containing all the fields from the related tables (with the problems we know: collision in column names). It is the existing behavior of GetOverduesForPatron and GetPendingIssues for instance, they are used to send notices and so we have to provide all the data needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 70327 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70327&action=edit Bug 19926: Add the Koha::Object->unblessed_all_relateds method In order to refactor our legacy code step-by-step, we will need to provide code with the exact same behaviors and then improve it. The same idea appears for the TT syntax for notices: we will want to deprecate the existing syntax in order to support only one syntax. Currently we fetch all the values from the related tables, without knowing which are actually used. I am suggestion to introduce a Koha::Object->unblessed_all_relateds method which will return a hash containing all the fields from the related tables (with the problems we know: collision in column names). It is the existing behavior of GetOverduesForPatron and GetPendingIssues for instance, they are used to send notices and so we have to provide all the data needed. See dependent bugs to understand the context and test this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 70328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70328&action=edit Bug 19926: Add tests for Koha::Object->unblessed_all_relateds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17553 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17553 [Bug 17553] Move GetOverduesForPatron to Koha::Patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19935 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19935 [Bug 19935] Move C4::Members::GetPendingIssues to the Koha namespace -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Benjamin Rokseth <benjamin.rokseth@deichman.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70327|0 |1 is obsolete| | --- Comment #3 from Benjamin Rokseth <benjamin.rokseth@deichman.no> --- Created attachment 72764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72764&action=edit Bug 19926: Add the Koha::Object->unblessed_all_relateds method In order to refactor our legacy code step-by-step, we will need to provide code with the exact same behaviors and then improve it. The same idea appears for the TT syntax for notices: we will want to deprecate the existing syntax in order to support only one syntax. Currently we fetch all the values from the related tables, without knowing which are actually used. I am suggestion to introduce a Koha::Object->unblessed_all_relateds method which will return a hash containing all the fields from the related tables (with the problems we know: collision in column names). It is the existing behavior of GetOverduesForPatron and GetPendingIssues for instance, they are used to send notices and so we have to provide all the data needed. See dependent bugs to understand the context and test this patch. Signed-off-by: Benjamin Rokseth <benjamin.rokseth@deichman.no> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Benjamin Rokseth <benjamin.rokseth@deichman.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70328|0 |1 is obsolete| | --- Comment #4 from Benjamin Rokseth <benjamin.rokseth@deichman.no> --- Created attachment 72765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72765&action=edit Bug 19926: Add tests for Koha::Object->unblessed_all_relateds Signed-off-by: Benjamin Rokseth <benjamin.rokseth@deichman.no> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Benjamin Rokseth <benjamin.rokseth@deichman.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |benjamin.rokseth@deichman.n | |o Status|Needs Signoff |Signed Off --- Comment #5 from Benjamin Rokseth <benjamin.rokseth@deichman.no> --- Great work Jo! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72764|0 |1 is obsolete| | Attachment #72765|0 |1 is obsolete| | --- Comment #6 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 73552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73552&action=edit Bug 19926: Add the Koha::Object->unblessed_all_relateds method In order to refactor our legacy code step-by-step, we will need to provide code with the exact same behaviors and then improve it. The same idea appears for the TT syntax for notices: we will want to deprecate the existing syntax in order to support only one syntax. Currently we fetch all the values from the related tables, without knowing which are actually used. I am suggestion to introduce a Koha::Object->unblessed_all_relateds method which will return a hash containing all the fields from the related tables (with the problems we know: collision in column names). It is the existing behavior of GetOverduesForPatron and GetPendingIssues for instance, they are used to send notices and so we have to provide all the data needed. See dependent bugs to understand the context and test this patch. Signed-off-by: Benjamin Rokseth <benjamin.rokseth@deichman.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 73553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73553&action=edit Bug 19926: Add tests for Koha::Object->unblessed_all_relateds Signed-off-by: Benjamin Rokseth <benjamin.rokseth@deichman.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED CC| |nick@bywatersolutions.com --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Enhancement, not backporting to 17.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org