Bug 24869

Summary: When Marc Record uses brackets in the publication Year the value is stored in the database as null
Product: Koha Reporter: Kelly McElligott <kelly>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24674
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Kelly McElligott 2020-03-13 21:11:39 UTC
For multiple reasons are < or [ used in cataloging dates that are either unknown or with a range.

These are three examples that do not work or get stored properly in Koha and the database.

[19--]

<1981->

[1981]

Currently, if a publication year has the hard brackets or the hungry alligators with a year, the date does not get stored in the database as a value, but it stored as null.  

It would be nice if Koha were to display the year regardless of the < or [ .  If a year is presented like this [19--], Koha should use the value of the year with 1900 in the database, and in a case such as this <1981->, it should be 1981.


The database holds these values as NULL.  When an item search in Koha is done with a record with one of these values, the publication year will display as 0, which is not helpful to a library when needing the publication date stored in the Marc Record.
Comment 1 Fridolin Somers 2020-07-24 09:10:32 UTC
Also we get some logs like :
Argument "[s.d.]" isn't numeric in int at /home/koha/src/C4/Biblio.pm line 2832.
Comment 2 Katrin Fischer 2020-07-24 12:35:04 UTC
Hi Kelly, I think this is a duplicate to bug 24674 - which has a patch awaiting testing :)

*** This bug has been marked as a duplicate of bug 24674 ***