Summary: | YY is not interpreted as a default value for authorities | ||
---|---|---|---|
Product: | Koha | Reporter: | Janusz Kaczmarek <januszop> |
Component: | Cataloging | Assignee: | Janusz Kaczmarek <januszop> |
Status: | Pushed to main --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | esther.melander, m.de.rooy |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.05.00
|
Circulation function: | |
Attachments: |
Bug 39559: YY is not interpreted as a default value for authorities
Bug 39559: YY is not interpreted as a default value for authorities Bug 39559: YY is not interpreted as a default value for authorities |
Description
Janusz Kaczmarek
2025-04-04 08:13:19 UTC
Created attachment 180615 [details] [review] Bug 39559: YY is not interpreted as a default value for authorities 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. Created attachment 180647 [details] [review] Bug 39559: YY is not interpreted as a default value for authorities 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> The patch appears to work. Created attachment 180811 [details] [review] Bug 39559: YY is not interpreted as a default value for authorities 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> The /e modifier is harmless here, just running substr. But should be used with caution.. Pushed for 25.05! Well done everyone, thank you! |