[Koha-bugs] [Bug 26516] Importing records with unexpected format of copyrightdate fails

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Nov 16 10:57:52 CET 2020


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

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

--- Comment #6 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 113655
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113655&action=edit
Bug 26516: [alternate] Don't accept incorrect values for
copyrightdate/publicationyear

The previous patch rejects incorrect values when saving to the db specifically
for copyrightdate
An error is thrown for the int conversion when it fails

Rather than catching things when saving we can fix the value when generated,
simply returning null when parsing
the record

To test:
1 - Add a new record to Koha making sure data is valid except 260$c:
    198-
2 - Save the record
3 - It fails
4 - Apply this patch
5 - Restart all the thigns
6 - Repeat
7 - Success!

Signed-off-by: David Nind <david at davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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


More information about the Koha-bugs mailing list