Bugzilla – Attachment 183391 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.99 KB, created by
Julian Maurice
on 2025-06-20 13:09:54 UTC
(
hide
)
Description:
Bug 30096: Add "late issue notification" to subscriptions batch mod tool
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2025-06-20 13:09:54 UTC
Size:
5.99 KB
patch
obsolete
>From 84a5c391cc37044877dcef44b3349f5fb653c822 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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 > >Sponsored-by: Ãcoles Nationales Supérieures d'Architecture >--- > .../modules/serials/subscription-batchedit.tt | 17 +++++++++++ > serials/subscription-batchedit.pl | 29 ++++++++++++++----- > 2 files changed, 39 insertions(+), 7 deletions(-) > >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 37d5a9f357..b2dbed74e8 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 >@@ -50,6 +50,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> >@@ -72,6 +73,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 %] >@@ -141,6 +149,15 @@ > <option value="1">Yes</option> > </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 da4e42c7f3..9a9966826a 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; >@@ -54,13 +55,14 @@ my $available_additional_fields = Koha::AdditionalFields->search( { tablename => > my $op = $cgi->param('op') || q{}; > if ( $op eq 'cud-batchedit' ) { > my %params = ( >- aqbooksellerid => scalar $cgi->param('booksellerid'), >- location => scalar $cgi->param('location'), >- branchcode => scalar $cgi->param('branchcode'), >- itemtype => scalar $cgi->param('itemtype'), >- notes => scalar $cgi->param('notes'), >- internalnotes => scalar $cgi->param('internalnotes'), >- serialsadditems => scalar $cgi->param('serialsadditems'), >+ aqbooksellerid => scalar $cgi->param('booksellerid'), >+ location => scalar $cgi->param('location'), >+ branchcode => scalar $cgi->param('branchcode'), >+ itemtype => scalar $cgi->param('itemtype'), >+ 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'), > ); > > # If we convert a blank string we get todays date, we should only convert enddate if it is not blank >@@ -98,11 +100,24 @@ if ( $op eq 'cud-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 ], > available_additional_fields => Koha::AdditionalFields->search( { tablename => 'subscription' } ), > referrer => scalar $cgi->param('referrer'), >+ letters => \@letters, >+ letters_map => \%letters_map, > ); > > output_html_with_http_headers $cgi, $cookie, $template->output; >-- >2.39.5
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
| 183391