]> git.koha-community.org Git - koha.git/commit
Bug 11046: Better handling of uncertain years for publicationyear
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 25 Aug 2017 05:39:16 +0000 (07:39 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 9 Jan 2018 20:24:16 +0000 (17:24 -0300)
commit665fcd2777928c947ad3aff68b9f8a8bc97575ef
tree0d7a8415a709952736afe585eef0b74d7521f65f
parent3e606fdd1b0e12a59c39585b1c7f4d418afe9e1a
Bug 11046: Better handling of uncertain years for publicationyear

This patch makes it possible that uncertain year like 18.. or 197x are
converted to 1800 or 1970 in Koha field copyrightdate (MARC21) or
publicationyear (UNIMARC). (The corresponding MARC record will not be
changed obviously.)

This change will allow for better results when sorting search results or
list contents on copyrightdate. Currently, things like 18.. will sort
together with zero.

Note: The regex now allows four possible uncertain year markers: x or X,
question mark or dot.

Test plan:
[1] Run t/db_dependent/Biblio/TransformMarcToKoha.t
[2] Edit a biblio record. Save 18.. into 260c. Check biblio.copyrightdate.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Followed test plan, patch worked as described, it also passed QA test
tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Biblio.pm
t/db_dependent/Biblio/TransformMarcToKoha.t