Bugzilla – Attachment 192148 Details for
Bug 41073
Import users expiry date default does not apply
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41073: Fix default expiry date which is being ignored
Bug-41073-Fix-default-expiry-date-which-is-being-i.patch (text/plain), 1.89 KB, created by
Bernard
on 2026-01-29 15:09:18 UTC
(
hide
)
Description:
Bug 41073: Fix default expiry date which is being ignored
Filename:
MIME Type:
Creator:
Bernard
Created:
2026-01-29 15:09:18 UTC
Size:
1.89 KB
patch
obsolete
>From a6d8d5d40916b1d21092204afdc8db2d648d73bb Mon Sep 17 00:00:00 2001 >From: Bernard Scaife <bernard.scaife@openfifth.co.uk> >Date: Mon, 3 Nov 2025 15:12:13 +0000 >Subject: [PATCH] Bug 41073: Fix default expiry date which is being ignored > >Fixes regression in which default expiry date is ignored due to regression introduced by fix for bug 34483. If default expiry date is completed in patron import tool, the value is ignored and expiry date unaltered. This patch fixes this error. > >Test plan: >1. User should exist and have expiry date in future (say 2099-12-31) >2. Save above as file >3. Tools > Import users >4. Choose file saved in 2 >5. Field to use for record matching: cardnumber >6. In default values set expiration date to a date in past (say 2025-10-19) using date picker >7. Select overwrite the existing one with this >8. Leave renew existing patrons as "use the expiration date in the file if present" >9. Run >10. Observe user expiry date is still 2099-12-31 >11. Apply patch / restart_all >12. Repeat 4 - 9 above >13. Observe user expiry date is now 2025-10-19 >--- > Koha/Patrons/Import.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm >index 976ffb8f370..78fad5bcdd5 100644 >--- a/Koha/Patrons/Import.pm >+++ b/Koha/Patrons/Import.pm >@@ -308,7 +308,9 @@ LINE: while ( my $borrowerline = <$handle> ) { > next if $col eq 'dateexpiry' && $update_dateexpiry; > > $borrower{$col} = $member->{$col} >- if $col eq 'dateexpiry' && ( !$csvkeycol{$col} || !$columns[ $csvkeycol{$col} ] ); >+ if $col eq 'dateexpiry' >+ && ( !$csvkeycol{$col} || !$columns[ $csvkeycol{$col} ] ) >+ && !$borrower{$col}; > > unless ( exists( $csvkeycol{$col} ) || $defaults->{$col} ) { > $borrower{$col} = $member->{$col} if ( $member->{$col} ); >-- >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 41073
:
188976
| 192148