Bugzilla – Attachment 171766 Details for
Bug 37902
Timezone ignored when passing rfc3339 formatted date (search 'q')
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37902: Do not convert a date if it has like markers
Bug-37902-Do-not-convert-a-date-if-it-has-like-mar.patch (text/plain), 1.36 KB, created by
Nick Clemens (kidclamp)
on 2024-09-19 13:45:18 UTC
(
hide
)
Description:
Bug 37902: Do not convert a date if it has like markers
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-09-19 13:45:18 UTC
Size:
1.36 KB
patch
obsolete
>From 367216fd2ddcb7f8ac06641a140579d9d48b9dfe Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 16 Sep 2024 10:43:13 +0200 >Subject: [PATCH] Bug 37902: Do not convert a date if it has like markers > >If we pass a datetime parameter we are adding "like" operator and % at >the beginning and ending of the attribute value. >For instance: > attributes=2024-09-16 10:11:12 > attributes:{ like => '%2024-09-16 10:11:12%' } > >We do not want to reach the fixup code and raise an exception. > >However I don't think we should add the like for datetime attributes >actually. But can we modify this behaviour now? > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Object.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Object.pm b/Koha/Object.pm >index 63efcdd68fa..d57a6ee26ae 100644 >--- a/Koha/Object.pm >+++ b/Koha/Object.pm >@@ -851,7 +851,7 @@ sub _recursive_fixup { > # Handle booleans gracefully > $value = ($value) ? 1 : 0; > } elsif ( _date_or_datetime_column_type( $column_info->{data_type} ) ) { >- if ( defined $value ) { >+ if ( defined $value && $value !~ m{^%|%$} ) { > try { > my $dtf = $self->_result->result_source->storage->datetime_parser; > if ( $column_info->{data_type} eq 'date' ) { >-- >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 37902
:
171389
|
171390
|
171391
|
171392
|
171402
|
171403
|
171515
|
171551
|
171652
|
171762
|
171763
|
171764
|
171765
|
171766
|
171767
|
171768
|
172105
|
172106
|
172107
|
172108
|
172109
|
172110
|
172111
|
172112