Bugzilla – Attachment 168299 Details for
Bug 37183
Serials batch edit changes the expiration date to TODAY
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37183 : Batch edit serial subscriptions sets expiration date to today
Bug-37183--Batch-edit-serial-subscriptions-sets-ex.patch (text/plain), 2.03 KB, created by
Chris Cormack
on 2024-06-29 22:56:24 UTC
(
hide
)
Description:
Bug 37183 : Batch edit serial subscriptions sets expiration date to today
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2024-06-29 22:56:24 UTC
Size:
2.03 KB
patch
obsolete
>From 72ecd0dee961b9e0f3a5c310dc114574abd2b916 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chris@bigballofwax.co.nz> >Date: Sat, 29 Jun 2024 22:52:42 +0000 >Subject: [PATCH] Bug 37183 : Batch edit serial subscriptions sets expiration > date to today > >To test >Serials: >1) Add a new serial, visit: >/cgi-bin/koha/serials/subscription-add.pl >2) Put a biblionumber in the 'record' field, i.e. '112'. Press 'next' and click 'ok' on the alert box >3) Fill all the required fields and click 'test prediction' >4) Fill the Subscription end date (= Expirations Date) >5) Click 'save subscription'. >6) Repeat steps 1-5 to create a second serial. > >Batch edit: >1) Visit serials and hit the 'Search' button: >/cgi-bin/koha/serials/serials-home.pl >2) Click the 2 checkboxes for the 2 serials we created previously and click the new link that pops up 'edit selected serials'. >3) Click 'Save' without changing anything. >4) Go back to either of the serials, notice the value for expiration Date is changed to TODAY (Date of the batch edit). > >Apply patch and retest note the date only changes if you set it now >--- > serials/subscription-batchedit.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/serials/subscription-batchedit.pl b/serials/subscription-batchedit.pl >index 903db1c4f0a..2cb8c56584c 100755 >--- a/serials/subscription-batchedit.pl >+++ b/serials/subscription-batchedit.pl >@@ -61,9 +61,10 @@ if ( $op eq 'cud-batchedit' ) { > notes => scalar $cgi->param('notes'), > internalnotes => scalar $cgi->param('internalnotes'), > serialsadditems => scalar $cgi->param('serialsadditems'), >- enddate => dt_from_string( scalar $cgi->param('enddate') ), > ); >- >+ # If we convert a blank string we get todays date, we should only convert enddate if it is not blank >+ $params{'enddate'} = dt_from_string( scalar $cgi->param('enddate') ) if $cgi->param('enddate'); >+ > my $field_values = {}; > foreach my $field (@available_additional_fields) { > my $value = $cgi->param( 'field_' . $field->id ); >-- >2.39.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 37183
:
168299
|
168305
|
168307