Bugzilla – Attachment 130550 Details for
Bug 30096
Allow to change "late issue notification" setting in subscriptions batch modification tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30096: Add "late issue notification" to subscriptions batch mod tool
Bug-30096-Add-late-issue-notification-to-subscript.patch (text/plain), 5.25 KB, created by
Julian Maurice
on 2022-02-14 15:47:27 UTC
(
hide
)
Description:
Bug 30096: Add "late issue notification" to subscriptions batch mod tool
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2022-02-14 15:47:27 UTC
Size:
5.25 KB
patch
obsolete
>From c0964fd310f14b86c2649ea9a4027398714203d2 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 14 Feb 2022 15:30:51 +0100 >Subject: [PATCH] Bug 30096: Add "late issue notification" to subscriptions > batch mod tool > >This patch depends on bug 29997 > >Test plan: >1. On the Serials module main page, do a search that return at least 2 > subscriptions >2. Check at least 2 boxes in the first column of the table, then click > on "Edit selected serials" above the table >3. Verify that the table above the form display correct data for the > "Late issue notification" column >4. Submit the form without changing anything. Verify that the setting > "late issue notification" was not changed for selected subscriptions >5. Repeat steps 1 and 2. Set "Late issue notification" to one of the > available options and submit the form. Verify that the setting "late > issue notification" was changed to the selected option for all > selected subscriptions >--- > .../modules/serials/subscription-batchedit.tt | 17 +++++++++++++++++ > serials/subscription-batchedit.pl | 15 +++++++++++++++ > 2 files changed, 32 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >index 360b18e41d..4a31786a67 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >@@ -49,6 +49,7 @@ > <th>Nonpublic notes</th> > <th>Call number</th> > <th>Create item when receiving</th> >+ <th>Late issue notification</th> > <th>Expiration date</th> > </tr> > </thead> >@@ -71,6 +72,13 @@ > <span>No</span> > [% END %] > </td> >+ <td> >+ [% IF letters_map.defined(subscription.late_issue_letter_code) %] >+ [% letters_map.item(subscription.late_issue_letter_code) | html %] >+ [% ELSE %] >+ [% subscription.late_issue_letter_code | html %] >+ [% END %] >+ </td> > <td>[% subscription.enddate | $KohaDates %]</td> > </tr> > [% END %] >@@ -140,6 +148,15 @@ > </select> > > </li> >+ <li> >+ <label for="late_issue_letter_code">Late issue notification: </label> >+ <select id="late_issue_letter_code" name="late_issue_letter_code"> >+ <option value="">No change</option> >+ [% FOREACH letter IN letters %] >+ <option value="[% letter.code | html %]">[% letter.name | html %]</option> >+ [% END %] >+ </select> >+ </li> > <li> > <label for="enddate">Expiration date: </label> > <input type="text" class="flatpickr" id="enddate" name="enddate" placeholder="No change"/> >diff --git a/serials/subscription-batchedit.pl b/serials/subscription-batchedit.pl >index 556f81e8b3..24c5b3baae 100755 >--- a/serials/subscription-batchedit.pl >+++ b/serials/subscription-batchedit.pl >@@ -27,6 +27,7 @@ use C4::Serials qw( can_edit_subscription ); > use Koha::Subscriptions; > use Koha::Acquisition::Booksellers; > use Koha::AdditionalFields; >+use Koha::Database; > use Koha::DateUtils qw( dt_from_string ); > > my $cgi = CGI->new; >@@ -59,6 +60,7 @@ if ($batchedit) { > notes => scalar $cgi->param('notes'), > internalnotes => scalar $cgi->param('internalnotes'), > serialsadditems => scalar $cgi->param('serialsadditems'), >+ late_issue_letter_code => scalar $cgi->param('late_issue_letter_code'), > enddate => dt_from_string(scalar $cgi->param('enddate')), > ); > >@@ -96,11 +98,24 @@ if ($batchedit) { > exit; > } > >+my $schema = Koha::Database->schema; >+my @letters = $schema->resultset('Letter')->search( >+ { module => 'serial' }, >+ { >+ columns => ['code', 'name'], >+ distinct => 1, >+ order_by => 'code', >+ }, >+); >+my %letters_map = map { $_->code => $_->name } @letters; >+ > $template->param( > subscriptions => \@subscriptions, > booksellers => [ Koha::Acquisition::Booksellers->search->as_list ], > additional_fields => \@additional_fields, > referrer => scalar $cgi->param('referrer'), >+ letters => \@letters, >+ letters_map => \%letters_map, > ); > > output_html_with_http_headers $cgi, $cookie, $template->output; >-- >2.30.2
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 30096
:
130550
|
175389