Bugzilla – Attachment 171423 Details for
Bug 37398
Initialize a datepicker on all date/datetime fields when adding/editing items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37398: Make sure subfield and subfield_date are defined
Bug-37398-Make-sure-subfield-and-subfielddate-are-.patch (text/plain), 1.86 KB, created by
Lucas Gass (lukeg)
on 2024-09-12 17:49:40 UTC
(
hide
)
Description:
Bug 37398: Make sure subfield and subfield_date are defined
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-09-12 17:49:40 UTC
Size:
1.86 KB
patch
obsolete
>From b22a737e306ea81358cec6671d792396489e1937 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 12 Sep 2024 16:43:53 +0000 >Subject: [PATCH] Bug 37398: Make sure subfield and subfield_date are defined > >--- > Koha/UI/Form/Builder/Item.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm >index 9a2011c1773..709f96038d6 100644 >--- a/Koha/UI/Form/Builder/Item.pm >+++ b/Koha/UI/Form/Builder/Item.pm >@@ -145,11 +145,11 @@ sub generate_subfield_form { > } > } > >- if ($subfield->{kohafield} =~ /items\.(replacementpricedate|dateaccessioned|datelastborrowed|onloan)/) { >+ if ( defined $subfield->{kohafield} && $subfield->{kohafield} =~ /items\.(replacementpricedate|dateaccessioned|datelastborrowed|onloan)/) { > $subfield_data{datetype} = 'date'; > } > >- if ($subfield->{kohafield} =~ /items\.(datelastseen|damaged_on|itemlost_on|withdrawn_on|deleted_on)/) { >+ if ( defined $subfield->{kohafield} && $subfield->{kohafield} =~ /items\.(datelastseen|damaged_on|itemlost_on|withdrawn_on|deleted_on)/) { > $subfield_data{datetype} = 'datetime'; > } > >@@ -317,14 +317,14 @@ sub generate_subfield_form { > authtypecode => $subfield->{authtypecode}, > }; > } >- elsif ( $subfield_data{datetype} eq 'date' ) { >+ elsif ( defined $subfield_data{datetype} && $subfield_data{datetype} eq 'date' ) { > $subfield_data{marc_value} = { > type => 'date_field', > id => $subfield_data{id}, > value => $value, > } > } >- elsif ( $subfield_data{datetype} eq 'datetime' ) { >+ elsif ( defined $subfield_data{datetype} && $subfield_data{datetype} eq 'datetime' ) { > $subfield_data{marc_value} = { > type => 'datetime_field', > id => $subfield_data{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 37398
:
171416
|
171417
|
171419
|
171420
|
171421
|
171422
|
171423
|
171424
|
171881
|
171882
|
171919
|
171963
|
172187
|
172188
|
172189
|
172190
|
172191
|
172192
|
172193
|
172194
|
172195
|
172196
|
174558
|
174559
|
174560
|
174561
|
174562
|
174563
|
174564
|
174565
|
174566