[Bug 25423] New: Methods update and empty from Koha::Objects are not class methods
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Bug ID: 25423 Summary: Methods update and empty from Koha::Objects are not class methods Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org They should be called with an instance of the class, not directly as class methods: Koha::Object->new->empty vs Koha::Object->empty A trick has been done earlier to accept the second form, but as we notice the same need/problem for another method it seems better to enforce a rule and forbid such calls. An exception will be raised if the methods are called without an instantiated object. See also commit 4805b9b9dd0a95d79faf450ed1aaaec62d544ec6 Bug 25296: Make ->empty work for uninstantiated calls -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23185 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23185 [Bug 23185] Koha::Objects supports passing through 'update' which means we can side step 'set' + 'store' -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104587 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104587&action=edit Bug 25423: Add Koha::Exceptions::Object::NotInstantiated Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104588 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104588&action=edit Bug 25423: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104587|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104589&action=edit Bug 25423: Add Koha::Exceptions::Object::NotInstantiated Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104588|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104590 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104590&action=edit Bug 25423: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104591 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104591&action=edit Bug 25423: (follow-up) Unit tests -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104592 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104592&action=edit Bug 25423: Force call to update and empty with an instanciated object -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@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=25423 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104592|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104589|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104590|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104591|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104593 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104593&action=edit Bug 25423: Add Koha::Exceptions::Object::NotInstantiated Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104594 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104594&action=edit Bug 25423: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104595 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104595&action=edit Bug 25423: (follow-up) Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104596 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104596&action=edit Bug 25423: Force call to update and empty with an instanciated object Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Tomás Cohen Arazi <tomascohen@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=25423 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Taking on Martin to push this one for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104618 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104618&action=edit Bug 25423: (follow-up) Fix wrong test This is confusing: why does it pass on all OSs but Debian 8? Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #13 from Joy Nelson <joy@bywatersolutions.com> --- not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Bug 25423 depends on bug 23185, which changed state. Bug 23185 Summary: Koha::Objects supports passing through 'update' which means we can side step 'set' + 'store' https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23185 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33810 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33810 [Bug 33810] Accessibility: OPAC Advanced Search fields are not labelled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25423 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|33810 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33810 [Bug 33810] Accessibility: OPAC Advanced Search fields are not labelled -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org