Bugzilla – Attachment 180811 Details for
Bug 39559
YY is not interpreted as a default value for authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39559: YY is not interpreted as a default value for authorities
Bug-39559-YY-is-not-interpreted-as-a-default-value.patch (text/plain), 1.57 KB, created by
Marcel de Rooy
on 2025-04-11 07:09:16 UTC
(
hide
)
Description:
Bug 39559: YY is not interpreted as a default value for authorities
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-04-11 07:09:16 UTC
Size:
1.57 KB
patch
obsolete
>From f54e5635e2a4838d4d0ca2e2dcf7073418cb22f5 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Fri, 4 Apr 2025 08:14:47 +0000 >Subject: [PATCH] Bug 39559: YY is not interpreted as a default value for > authorities >Content-Type: text/plain; charset=utf-8 > >Strings as YYYY, MM, DD put as part of default value for authorities >are interpreted as year (four digits), month and day. YY is missing >(two digits year). BTW, for bibliographic records it is <YYYY>, <YY>, ><MM>, <DD> (in Koha/UI/Form/Builder/Biblio.pm). > >Test plan: >========== >1. Edit an authority framework of your choice > (/cgi-bin/koha/admin/authtypes.pl), inserting a default value that > contains YY for a known field. >2. Create a new authority record of the chosen type. Control the field > for which a default value was defined. You should see YY. >3. Apply the patch ; restart_all. >4. Repeat p. 2. There should be a current year (two digits, like '25') > in place of YY. > >Signed-off-by: esther <esther@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > authorities/authorities.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/authorities/authorities.pl b/authorities/authorities.pl >index 3385a260fa..cad97371c4 100755 >--- a/authorities/authorities.pl >+++ b/authorities/authorities.pl >@@ -131,6 +131,7 @@ sub create_input { > $month = sprintf( "%02d", $month ); > $day = sprintf( "%02d", $day ); > $value =~ s/YYYY/$year/g; >+ $value =~ s/YY/substr($year,2)/eg; > $value =~ s/MM/$month/g; > $value =~ s/DD/$day/g; > } >-- >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 39559
:
180615
|
180647
| 180811