[Bug 17397] New: Add name of librarian who created circulation message
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Bug ID: 17397 Summary: Add name of librarian who created circulation message Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: josef.moravec@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com -- 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=17397 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |josef.moravec@gmail.com |ity.org | Status|NEW |ASSIGNED -- 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=17397 --- Comment #1 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 56026 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56026&action=edit Bug 17397: Show name of librarian who created circulation message Test plan: 1) Apply the patch 2) Update DB structure 3) Run update_dbix_class_files.pl 4) Select patron for checking out 5) Try to add some circulation and opac messages 6) Note that now there is creator (you ;) ) shown by every message added (with link to creator profile) 7) Try to delete messages to confirm that everything works as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Josef Moravec <josef.moravec@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=17397 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add name of librarian who |Show name of librarian who |created circulation message |created circulation message -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17398 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17398 [Bug 17398] Enhance circulation message UI -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #2 from Marc Véron <veron@veron.ch> --- Sorry, QA-Tools complain: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (...) FAIL tt_valid lines 855 See: https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML1:_Template_Toolk... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56026|0 |1 is obsolete| | --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 56044 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56044&action=edit Bug 17397: Show name of librarian who created circulation message Test plan: 1) Apply the patch 2) Update DB structure 3) Run update_dbix_class_files.pl 4) Select patron for checking out 5) Try to add some circulation and opac messages 6) Note that now there is creator (you ;) ) shown by every message added (with link to creator profile) 7) Try to delete messages to confirm that everything works as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56044|0 |1 is obsolete| | --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 56045 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56045&action=edit Bug 17397: Show name of librarian who created circulation message Test plan: 1) Apply the patch 2) Update DB structure 3) Run update_dbix_class_files.pl 4) Select patron for checking out 5) Try to add some circulation and opac messages 6) Note that now there is creator (you ;) ) shown by every message added (with link to creator profile) 7) Try to delete messages to confirm that everything works as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56045|0 |1 is obsolete| | --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 56046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56046&action=edit Bug 17397: Show name of librarian who created circulation message Test plan: 1) Apply the patch 2) Update DB structure 3) Run update_dbix_class_files.pl 4) Select patron for checking out 5) Try to add some circulation and opac messages 6) Note that now there is creator (you ;) ) shown by every message added (with link to creator profile) 7) Try to delete messages to confirm that everything works as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #6 from Josef Moravec <josef.moravec@gmail.com> --- Sorry, now Koha QA tools passed cleanly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@univ-lyon3.fr Status|Needs Signoff |Signed Off --- Comment #7 from Koha Team Lyon 3 <koha@univ-lyon3.fr> --- I have tried to add different messages from different libraries staff user. Names appears correctly in pro interface and libraries in OPAC interface. Message are correctly deleted. It respects the syspref AllowAllMessageDeletion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56046|0 |1 is obsolete| | --- Comment #8 from Koha Team Lyon 3 <koha@univ-lyon3.fr> --- Created attachment 56503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56503&action=edit Bug 17397: Show name of librarian who created circulation message Test plan: 1) Apply the patch 2) Update DB structure 3) Run update_dbix_class_files.pl 4) Select patron for checking out 5) Try to add some circulation and opac messages 6) Note that now there is creator (you ;) ) shown by every message added (with link to creator profile) 7) Try to delete messages to confirm that everything works as expected Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 56503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56503 Bug 17397: Show name of librarian who created circulation message Review of attachment 56503: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17397&attachment=56503) ----------------------------------------------------------------- ::: Koha/Patron/Message.pm @@ +49,5 @@
and $self->message_type and $self->branchcode;
+ my $userenv = C4::Context->userenv; + $self->manager_id($userenv ? $userenv->{number} : 0);
Please provide tests. ::: circ/circulation.pl @@ +587,5 @@
+ $this_item->{message} = $content->message; + $this_item->{manager_id} = $content->manager_id; + $this_item->{name} = $content->_result->get_column('manager_firstname') . ' ' . $content->_result->get_column('manager_surname'); + + push @messages, $this_item;
You should not need this loop. You can access the message's methods from the template. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #10 from Josef Moravec <josef.moravec@gmail.com> ---
@@ +587,5 @@
+ $this_item->{message} = $content->message; + $this_item->{manager_id} = $content->manager_id; + $this_item->{name} = $content->_result->get_column('manager_firstname') . ' ' . $content->_result->get_column('manager_surname'); + + push @messages, $this_item;
You should not need this loop. You can access the message's methods from the template.
I have written some tests and now I tried to eliminate that loop. I am able to access columns from table messages, but I can't access the two columns which are get by relation to table borrowers - manager_firstname and manager_surname... I am probably doing something wrong... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56503|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 56911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56911&action=edit Bug 17397: Show name of librarian who created circulation message Test plan: 1) Apply the patch 2) Update DB structure 3) Run update_dbix_class_files.pl 4) Select patron for checking out 5) Try to add some circulation and opac messages 6) Note that now there is creator (you ;) ) shown by every message added (with link to creator profile) 7) Try to delete messages to confirm that everything works as expected Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 56912 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56912&action=edit Bug 17397: Simplify code passing the Koha::Object to the template Instead of creating a new array Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 56913 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56913&action=edit Bug 17397: Do not display parenthesis if the manager has been deleted Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Josef, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Kyle M Hall from comment #14)
Pushed to master for 16.11, thanks Josef, Jonathan!
The DBix::Class schema is not up-to-date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #15)
(In reply to Kyle M Hall from comment #14)
Pushed to master for 16.11, thanks Josef, Jonathan!
The DBix::Class schema is not up-to-date
Fixed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This patch set seems to break t/db_dependent/Koha/Patron/Messages.t, please fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #18 from Josef Moravec <josef.moravec@gmail.com> --- I'll work on it in just few hours, I am pretty sure I have some test code on my another machine... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17558 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17558 [Bug 17558] Fix t/db_dependent/Koha/Patron/Messages.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 --- Comment #19 from Josef Moravec <josef.moravec@gmail.com> --- I added fix to new bug 17558 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |mtj@kohaaloha.com --- Comment #20 from Mason James <mtj@kohaaloha.com> --- (In reply to Kyle M Hall from comment #14)
Pushed to master for 16.11, thanks Josef, Jonathan!
contains DB changes, passing for 16.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17397 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org