[Bug 17091] New: Add AUTOLOAD to Koha::Objects
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Bug ID: 17091 Summary: Add AUTOLOAD to Koha::Objects Change sponsored?: --- Product: Koha Version: master 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 Up to now if a Koha::Objects based object needs to call DBIx::Class methods, we have to create a new method for Koha::Objects, something like: sub method { my $self = shift; return $self->_resultset->method } To simplify and ease the call to DBIx::Class method, we could create an AUTOLOAD method. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 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=17091 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54217 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54217&action=edit Bug 17091: Add AUTOLOAD to Koha::Objects Up to now if a Koha::Objects based object needs to call DBIx::Class methods, we have to create a new method for Koha::Objects, something like: sub method { my $self = shift; return $self->_resultset->method } To simplify and ease the call to DBIx::Class method, this patch defines an AUTOLOAD to call the DBIx::Class method on the resultset we are encapsulating. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54218&action=edit Bug 17091: Remove explicit declaration of Koha::Objects->update Test plan: prove t/db_dependent/Koha/Objects.t should return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54219 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54219&action=edit Bug 17091: Remove explicit declaration of Koha::Objects->count Test plan: prove t/db_dependent/Koha/Objects.t should return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54220 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54220&action=edit Bug 17091: Remove explicit declaration of Koha::Objects->pager Test plan: prove t/db_dependent/Koha/Objects.t should return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54221 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54221&action=edit Bug 17091: Remove explicit declaration of Koha::Objects->reset Test plan: prove t/db_dependent/Koha/Objects.t should return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |16961 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16961 [Bug 16961] Add the Koha::Objects->update method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54223 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54223&action=edit Bug 17091: In a first phase, restrict the usage of AUTOLOAD in Koha::Objects To make sure the methods will be covered by tests and devs won't overused this method, I think it may be a good idea to restrict its usage. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17094 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17094 [Bug 17094] Methods of Koha::Object[s]-based classed should not return DBIx::Class objects -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54217|0 |1 is obsolete| | --- Comment #7 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 54272 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54272&action=edit [SIGNED-OFF]Bug 17091: Add AUTOLOAD to Koha::Objects Up to now if a Koha::Objects based object needs to call DBIx::Class methods, we have to create a new method for Koha::Objects, something like: sub method { my $self = shift; return $self->_resultset->method } To simplify and ease the call to DBIx::Class method, this patch defines an AUTOLOAD to call the DBIx::Class method on the resultset we are encapsulating. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #8 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 54273 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54273&action=edit [SIGNED-OFF]Bug 17091: Remove explicit declaration of Koha::Objects->update Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54218|0 |1 is obsolete| | Attachment #54219|0 |1 is obsolete| | --- Comment #9 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 54274 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54274&action=edit [SIGNED-OFF]Bug 17091: Remove explicit declaration of Koha::Objects->count Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54220|0 |1 is obsolete| | Attachment #54221|0 |1 is obsolete| | Attachment #54223|0 |1 is obsolete| | --- Comment #10 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 54275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54275&action=edit [SIGNED-OFF]Bug 17091: Remove explicit declaration of Koha::Objects->pager Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #11 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 54276 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54276&action=edit [SIGNED-OFF]Bug 17091: Remove explicit declaration of Koha::Objects->reset Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #12 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 54277 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54277&action=edit [SIGNED-OFF]Bug 17091: In a first phase, restrict the usage of AUTOLOAD in Koha::Objects To make sure the methods will be covered by tests and devs won't overused this method, I think it may be a good idea to restrict its usage. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> AUTOLOAD added. No Koha QA errors. Test passed successfully -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hector.hecaxmmx@gmail.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17226 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 55378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55378&action=edit Bug 17091: Add delete to the Koha::Objects AUTOLOAD method Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14899 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14899 [Bug 14899] Mapping configuration page for Elastic search -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Kyle M Hall <kyle@bywatersolutions.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=17091 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54272|0 |1 is obsolete| | Attachment #54273|0 |1 is obsolete| | Attachment #54274|0 |1 is obsolete| | Attachment #54275|0 |1 is obsolete| | Attachment #54276|0 |1 is obsolete| | Attachment #54277|0 |1 is obsolete| | Attachment #55378|0 |1 is obsolete| | --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 56142 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56142&action=edit Bug 17091: Add AUTOLOAD to Koha::Objects Up to now if a Koha::Objects based object needs to call DBIx::Class methods, we have to create a new method for Koha::Objects, something like: sub method { my $self = shift; return $self->_resultset->method } To simplify and ease the call to DBIx::Class method, this patch defines an AUTOLOAD to call the DBIx::Class method on the resultset we are encapsulating. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 56143 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56143&action=edit Bug 17091: Remove explicit declaration of Koha::Objects->update Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 56144 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56144&action=edit Bug 17091: Remove explicit declaration of Koha::Objects->count Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 56145 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56145&action=edit Bug 17091: Remove explicit declaration of Koha::Objects->pager Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 56146 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56146&action=edit Bug 17091: Remove explicit declaration of Koha::Objects->reset Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #19 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 56147 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56147&action=edit Bug 17091: In a first phase, restrict the usage of AUTOLOAD in Koha::Objects To make sure the methods will be covered by tests and devs won't overused this method, I think it may be a good idea to restrict its usage. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> AUTOLOAD added. No Koha QA errors. Test passed successfully Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 56148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56148&action=edit Bug 17091: Add delete to the Koha::Objects AUTOLOAD method Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17425 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17425 [Bug 17425] Koha::Object should raise exceptions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #21 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the November 2016 release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17552 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17552 [Bug 17552] Koha::Objects does not allow chaining -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #22 from Mason James <mtj@kohaaloha.com> --- Enhancement, skipping for 16.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17226 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17226 [Bug 17226] Improve AUTOLOAD of Koha::Object -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19989 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19989 [Bug 19989] opac-memberentry.pl has a FIXME that can be fixed -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org