@@ -, +, @@ * Create 2 new DB columns: suggestions.lastmodificationby and suggestion.lastmodificationdate * Choose a manager when editing a suggestion * Batch modify suggestions and set a manager for them * Let notify the new manager using the TO_PROCESS letter * Display the manageddate, lastmodificationby and lastmodificationdate info where appropriate a. Execute the update DB entry, generate the new DBIC file and restart all b. Create at least 2 patrons with the suggestions_manage permission --- .../prog/en/modules/suggestion/suggestion.tt | 68 ++++++++++++++++++++-- suggestion/suggestion.pl | 3 +- 2 files changed, 64 insertions(+), 7 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -366,17 +366,35 @@ - - [% INCLUDE 'date-format.inc' %] - [% IF ( managedby_borrowernumber ) %][% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %]) [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])[% END %] - - [% INCLUDE 'date-format.inc' %] [% IF ( acceptedby_borrowernumber ) %][% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %]) [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])[% END %] - + + +
  • + + [% INCLUDE 'date-format.inc' %] +
  • +
  • + +
    + + You + + [% IF managedby_borrowernumber && logged_in_user.borrowernumber != managedby_borrowernumber %] + | Previously was [% INCLUDE 'patron-title.inc' patron=managedby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %]) + [% END %] +
    + Select manager + [% IF managedby_borrowernumber && logged_in_user.borrowernumber != managedby_borrowernumber %] + Keep existing manager + [% END %] + +
    +
  • +
    Acquisition information
    1. @@ -946,6 +964,27 @@ [% END %] [% IF ( op_save ) %] [% END %] --- a/suggestion/suggestion.pl +++ a/suggestion/suggestion.pl @@ -155,7 +155,7 @@ if ( $op =~ /save/i ) { $suggestion_only->{ lc( $suggestion_only->{"STATUS"}) . "by" } = C4::Context->userenv->{number}; } $suggestion_only->{manageddate} = dt_from_string; - $suggestion_only->{"managedby"} = C4::Context->userenv->{number}; + $suggestion_only->{"managedby"} ||= C4::Context->userenv->{number}; } my $otherreason = $input->param('other_reason'); @@ -335,6 +335,7 @@ foreach my $element ( qw(managedby suggestedby acceptedby) ) { my $patron = Koha::Patrons->find( $$suggestion_ref{$element} ); my $category = $patron->category; $template->param( + $element."_patron"=> $patron, $element."_borrowernumber"=>$patron->borrowernumber, $element."_firstname"=>$patron->firstname, $element."_surname"=>$patron->surname, --