[Koha-bugs] [Bug 24134] Add placeholder for 2 digit years to allow autogeneration of dates in 008

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 29 01:08:13 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24134

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #96113|0                           |1
        is obsolete|                            |

--- Comment #7 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 105430
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105430&action=edit
Bug 24134: Add placeholder for 2 digit years to allow autogeneration of dates
in 008

This patch modifies the code for parsing MARC framework configurations
so that the placeholder "<<YY>>" translates to a two-year date.

To test, apply the patch and modify a framework to include placeholders.
For example, in MARC21:

 - Administration -> MARC structure -> 952 -> Edit subfields -> d
 - Expand "Advanced constraints" and add a default value:
   <<YYYY>> <<YY>> <<MM>> <<DD>> <<USER>>
 - Save your configuration and go to Cataloging.
 - Go to the add/edit items page for a record which uses the framework
   you edited.
 - In the "Add item" form, in the "Date aquired" field, you should see
   the correct values. For example: '2019 19 12 03 Leonard'

Perform the same test when adding an item during the Acquisitions
process (depending on your AcqCreateItem setting).

Note that acqui/neworderempty.pl has been modified because the
placeholder-replacement code is repeated there, but I couldn't discover
how to test it (if it is used at all?)

Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list