[Bug 29785] New: Koha::Object->messages must be renamed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Bug ID: 29785 Summary: Koha::Object->messages must be renamed Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart+koha@gmail.com Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org It will conflict with other ->messages methods, it's too generic. Bug 29230 needs Koha::Patron->messages to return Koha::Patron::Messages for instance. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29230 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29230 [Bug 29230] Patron's messages not accessible from template notices -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=29785 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128986 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128986&action=edit Bug 29785: Rename Koha::Object->message with ->object_messages It will conflict with other ->messages methods, it's too generic. Bug 29230 needs Koha::Patron->messages to return Koha::Patron::Messages for instance. Test plan: Confirm that the tests modified by this patch still pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=29785 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128986|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=29785 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130018 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130018&action=edit Bug 29785: Rename Koha::Object->message with ->object_messages It will conflict with other ->messages methods, it's too generic. Bug 29230 needs Koha::Patron->messages to return Koha::Patron::Messages for instance. Test plan: Confirm that the tests modified by this patch still pass 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=29785 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Rebased and signed. Trivial change, 'messages()' was cleary too generic. Good catch, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This looks like it still needs attention though: =head3 messages my @messages = @{ $bool->messages }; Returns the I<Koha::Object::Message> objects that were recorded. =cut sub messages { my ( $self ) = @_; $self->{_messages} = [] unless defined $self->{_messages}; return $self->{_messages}; } Kind of strange btw that we add a lot of code there? Koha::Result::Boolean->new(0)->add_message({ message => $error }); Please provide feedback! Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Marcel de Rooy from comment #4)
This looks like it still needs attention though:
=head3 messages
my @messages = @{ $bool->messages };
Returns the I<Koha::Object::Message> objects that were recorded.
=cut
sub messages { my ( $self ) = @_;
$self->{_messages} = [] unless defined $self->{_messages};
return $self->{_messages}; }
This looks correct to me, Koha::Result::Boolean is not inheriting from Koha::Object.
Kind of strange btw that we add a lot of code there? Koha::Result::Boolean->new(0)->add_message({ message => $error });
Can you detail what you mean here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #5)
(In reply to Marcel de Rooy from comment #4) This looks correct to me, Koha::Result::Boolean is not inheriting from Koha::Object.
Okay
Kind of strange btw that we add a lot of code there? Koha::Result::Boolean->new(0)->add_message({ message => $error });
Can you detail what you mean here?
Forget that. Result here confused me a bit. Surely it not a Schema::Result, but what is a Koha::Result actually? No answer needed here :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130018|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 130043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130043&action=edit Bug 29785: Rename Koha::Object->message with ->object_messages It will conflict with other ->messages methods, it's too generic. Bug 29230 needs Koha::Patron->messages to return Koha::Patron::Messages for instance. Test plan: Confirm that the tests modified by this patch still pass Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.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=29785 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Should we also rename Koha::Object::add_message ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.03 released in| | Status|Pushed to master |Pushed to stable --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |andrew@bywatersolutions.com Version(s)|22.05.00,21.11.03 |22.05.00,21.11.03,21.05.11 released in| | --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29785 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net Resolution|--- |FIXED --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org