Bugzilla – Attachment 69474 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-su.patch (text/plain), 9.99 KB, created by
Alex Buckley
on 2017-12-04 00:59:10 UTC
(
hide
)
Description:
Bug 7047 - Storing subscription renewal note in suggestion to be displayed on the suggestion page.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-12-04 00:59:10 UTC
Size:
9.99 KB
patch
obsolete
>From ec8d66f0dd90005ad27635dda4e67a43867a8e35 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. > >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 >--- > C4/Serials.pm | 8 +++++--- > C4/Suggestions.pm | 2 ++ > .../prog/en/modules/serials/subscription-renew.tt | 13 +++++++++++++ > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 6 +++++- > serials/subscription-renew.pl | 6 +++++- > suggestion/suggestion.pl | 1 - > 6 files changed, 30 insertions(+), 6 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 45bae8c..2dd4705 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -1504,7 +1504,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| >@@ -1524,8 +1525,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/C4/Suggestions.pm b/C4/Suggestions.pm >index 1ea2339..9240615 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -443,7 +443,9 @@ sub NewSuggestion { > accepteddate > rejectedby > rejecteddate >+ note > budgetid >+ branchcode > ) ) { > # Set the fields to NULL if not given. > $suggestion->{$field} ||= undef; >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 e7eb83d..a69c2f9 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 >@@ -35,6 +35,19 @@ > <ol><li><label for="numberlength">Number of num:</label><input type="text" id="numberlength" name="numberlength" value="[% numberlength %]" /></li> > <li><label for="weeklength">Number of weeks: </label><input type="text" id="weeklength" name="weeklength" value="[% weeklength %]" /></li> > <li><label for="monthlength">Number of months: </label><input type="text" id="monthlength" name="monthlength" value="[% monthlength %]" /></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 5a8ada6..db5fba3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -627,6 +627,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > <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> >@@ -646,13 +647,16 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > <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 ) %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<span class="note">[% suggestions_loo.note |html%]</span>[% 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 ) %] [% END %]<br /> > </td> > <td> > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby %]">[% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby %])[% END %]</a> > [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate | $KohaDates %][% END %] > </td> > <td> >+ [% suggestions_loo.note | html %] >+ </td> >+ <td> > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby %]">[% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby %][% END %]</a> > [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %] > </td> >diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl >index bbbc8e5..2738ef0 100755 >--- a/serials/subscription-renew.pl >+++ b/serials/subscription-renew.pl >@@ -62,6 +62,7 @@ my $dbh = C4::Context->dbh; > my $mode = $query->param('mode') || q{}; > my $op = $query->param('op') || 'display'; > my $subscriptionid = $query->param('subscriptionid'); >+my $branchcode = $query->param('branchcode'); > my $done = 0; # for after form has been submitted > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >@@ -79,7 +80,7 @@ if ( $op eq "renew" ) { > $subscriptionid, $loggedinuser, > $startdate, $query->param('numberlength'), > $query->param('weeklength'), $query->param('monthlength'), >- $query->param('note') >+ $query->param('note'), $branchcode > ); > } > >@@ -92,11 +93,14 @@ if ($subscription->{'cannotedit'}){ > my $newstartdate = output_pref( { str => $subscription->{enddate}, dateonly => 1 } ) > or output_pref( { dt => dt_from_string, dateonly => 1 } ); > >+my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); >+ > $template->param( > startdate => $newstartdate, > numberlength => $subscription->{numberlength}, > weeklength => $subscription->{weeklength}, > monthlength => $subscription->{monthlength}, >+ libraries => $libraries, > subscriptionid => $subscriptionid, > bibliotitle => $subscription->{bibliotitle}, > $op => 1, >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 94e6eab..211a9af 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -29,7 +29,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.1.4
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