Bugzilla – Attachment 81080 Details for
Bug 21596
Handle default values when storing Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21596: Handle updated_on
Bug-21596-Handle-updatedon.patch (text/plain), 1.41 KB, created by
Jonathan Druart
on 2018-10-24 17:37:36 UTC
(
hide
)
Description:
Bug 21596: Handle updated_on
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-24 17:37:36 UTC
Size:
1.41 KB
patch
obsolete
>From 1f76f313da9012c647926e688a97b04b8fe08a69 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 24 Oct 2018 14:35:16 -0300 >Subject: [PATCH] Bug 21596: Handle updated_on > >This has been picked from the solution proposed on bug 21610. It may not >be pushed soon and so we need a fix for the failing tests >(t/Auth_with_shibboleth.t) > >Test plan: > prove -r t/Auth_with_shibboleth.t t/db_dependent/Koha/Patrons* >must return green >--- > Koha/Patron.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 74157731e1..ec13bb0296 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -197,7 +197,14 @@ sub store { > $self->debarred(undef) unless $self->debarred; > $self->date_renewed(undef) unless $self->date_renewed; > $self->lastseen(undef) unless $self->lastseen; >- $self->updated_on(undef) unless $self->updated_on; >+ >+ if ( defined $self->updated_on and not $self->updated_on ) { >+ $self->updated_on(undef); >+ } else { >+ # This is bad we should use columns_info instead >+ # But it will avoid unecessary processing >+ $self->updated_on(\"current_timestamp"); >+ } > > # Set default values if not set > $self->sms_provider_id(undef) unless $self->sms_provider_id; >-- >2.11.0
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 21596
:
80804
|
80807
|
80808
|
80809
|
80810
|
80837
|
80838
|
80839
|
80840
|
80844
|
80845
|
80846
|
80847
| 81080 |
81160
|
81537