Bugzilla – Attachment 96309 Details for
Bug 7047
Renewing serials note not visible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7047: Storing subscription renewal note in suggestion to be displayed on the suggestion page.
Bug-7047-Storing-subscription-renewal-note-in-sugg.patch (text/plain), 9.58 KB, created by
Jonathan Druart
on 2019-12-16 11:03:30 UTC
(
hide
)
Description:
Bug 7047: Storing subscription renewal note in suggestion to be displayed on the suggestion page.
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-12-16 11:03:30 UTC
Size:
9.58 KB
patch
obsolete
>From 597e08d5d230334e7d4943dfde063ac457f25055 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 4 Dec 2017 13:35:01 +1300 >Subject: [PATCH] Bug 7047: Storing subscription renewal note in suggestion to > be displayed on the suggestion page. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Additionally I have added a library input field in case the librarian wants to set a library branch whilst renewing a subscription. With the use case being they may have ommitted to set the branchcode whilst creating the subscription. > >Test plan: >1. Create a subscription (if one does not already exist) > >2. Set the RenewSerialAddsSuggestion syspref to 'Add' > >3. Renew the item making sure to write in a value into the note field > >3. Visit the suggestions page and notice that the note is not displayed >for the newly created suggestion > >4. Apply patch > >5. Repeat step 3. Notice that there is now a new branchcode dropdown >box. Select one of your libraries and write in the value into the note >field > >6. Visit suggestions and notice there is now a 'Suggestion note' column >in the table containing the note. > >Also note that the suggestion has the correct branchcode associated with >it > >Sponsored-By: Catalyst IT >Signed-off-by: Maksim Sen <maksim@inlibro.com> > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > C4/Serials.pm | 8 +++++--- > .../prog/en/modules/serials/subscription-renew.tt | 14 ++++++++++++++ > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 6 +++++- > serials/subscription-renew.pl | 6 +++++- > suggestion/suggestion.pl | 1 - > 5 files changed, 29 insertions(+), 6 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 7d885132e4..66e65218c0 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -1476,7 +1476,8 @@ this function renew a subscription with values given on input args. > =cut > > sub ReNewSubscription { >- my ( $subscriptionid, $user, $startdate, $numberlength, $weeklength, $monthlength, $note ) = @_; >+ my ( $subscriptionid, $user, $startdate, $numberlength, $weeklength, $monthlength, $note, $branchcode ) = @_; >+ warn $note; > my $dbh = C4::Context->dbh; > my $subscription = GetSubscription($subscriptionid); > my $query = qq| >@@ -1496,8 +1497,9 @@ sub ReNewSubscription { > 'title' => $subscription->{bibliotitle}, > 'author' => $biblio->{author}, > 'publishercode' => $biblio->{publishercode}, >- 'note' => $biblio->{note}, >- 'biblionumber' => $subscription->{biblionumber} >+ 'note' => $note, >+ 'biblionumber' => $subscription->{biblionumber}, >+ 'branchcode' => $branchcode, > } > ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >index 982646485d..cfba7c32a6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >@@ -40,6 +40,20 @@ > <ol><li><label for="numberlength">Number of num:</label><input type="text" id="numberlength" name="numberlength" value="[% subscription.numberlength | html %]" /></li> > <li><label for="weeklength">Number of weeks: </label><input type="text" id="weeklength" name="weeklength" value="[% subscription.weeklength | html %]" /></li> > <li><label for="monthlength">Number of months: </label><input type="text" id="monthlength" name="monthlength" value="[% subscription.monthlength | html %]" /></li></ol></fieldset></li> >+ >+<li><label for="branchcode">Library:</label> >+ <select name="branchcode" id="branchcode" style="width: 20em;"> >+ [% UNLESS ( Independentbranches ) %] >+ <option value="">None</option> >+ [% END %] >+ [% IF CAN_user_serials_superserials %] >+ [% FOREACH library IN libraries %] >+ <option value="[% library.branchcode %]"> [% library.branchname %] </option> >+ [% END %] >+ [% END %] >+</select> (select a library) >+</li> >+ > <li><label for="note">Note for the librarian that will manage your renewal request: </label> > <textarea name="note" id="note" rows="5" cols="50"></textarea></li></ol></fieldset> > <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 30ab2b46b9..8f3cda6049 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -474,6 +474,7 @@ > <th class="NoSort"> </th> > <th class="anti-the">Suggestion</th> > <th>Suggested by - on</th> >+ <th>Suggestion note</th> > <th>Managed by - on</th> > <th>Library</th> > <th>Fund</th> >@@ -493,7 +494,7 @@ > <br /> > [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %] > [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %] >- [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn | html %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode | html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle | html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<div class="note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>[% END %] >+ [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn | html %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode | html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle | html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %] [% END %]<br /> > </td> > <td> > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | uri %]">[% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% END %]</a> >@@ -501,6 +502,9 @@ > </td> > <td> > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | uri %]">[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %]</a> >+ <td> >+ [% IF ( suggestions_loo.note ) %]<div class="note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>[% END %] >+ </td> > [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %] > </td> > <td> >diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl >index ccfbad2916..1e6f85b119 100755 >--- a/serials/subscription-renew.pl >+++ b/serials/subscription-renew.pl >@@ -61,6 +61,7 @@ my $dbh = C4::Context->dbh; > my $mode = $query->param('mode') || q{}; > my $op = $query->param('op') || 'display'; > my @subscriptionids = $query->multi_param('subscriptionid'); >+my $branchcode = $query->param('branchcode'); > my $done = 0; # for after form has been submitted > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >@@ -83,7 +84,7 @@ if ( $op eq "renew" ) { > $subscriptionid, $loggedinuser, > $startdate, scalar $query->param('numberlength'), > scalar $query->param('weeklength'), scalar $query->param('monthlength'), >- scalar $query->param('note') >+ scalar $query->param('note'), $branchcode > ); > } elsif ( $op eq 'multi_renew' ) { > for my $subscriptionid ( @subscriptionids ) { >@@ -113,8 +114,11 @@ if ( $op eq "renew" ) { > ); > } > >+my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); >+ > $template->param( > op => $op, >+ libraries => $libraries, > ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index ef153ba88b..ef349d25ed 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -28,7 +28,6 @@ use C4::Budgets; > use C4::Search; > use C4::Members; > use C4::Debug; >- > use Koha::DateUtils qw( dt_from_string ); > use Koha::AuthorisedValues; > use Koha::Acquisition::Currencies; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7047
:
69474
|
71168
|
72639
|
96309
|
96310
|
96311
|
96317
|
96318
|
96319
|
96320
|
96321
|
96585
|
96586
|
96587
|
96588
|
96589