Bug 5103: Format dates in MARC detail using dateformat syspref
authorAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 26 Feb 2020 02:52:24 +0000 (02:52 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 16 Mar 2020 10:56:25 +0000 (10:56 +0000)
commit8d505e371fa6c5848af47d48d43872fb922dc04c
tree715d669e228d09b82210155e98b0f2aa88f4392a
parent81fd7a6936d258001aa3a0f2d0ec5d7758482f45
Bug 5103: Format dates in MARC detail using dateformat syspref

This patch fixes the formatting of dates on the following pages:
- catalogue/MARCdetail.pl (staff)
- cataloguing/additem.pl (staff)
- opac-MARCdetail.pl (opac)

To test:
1) Ensure that the following fields are visible in the opac, intranet
and editor. You may need to edit the subfields in your default
bibliographic framework
952$d date accessioned
952$q date due/on loan
952$r date last seen
952$s date last borrowed
952$w replacement price date

Also ensure you have dateformat system preference set

2) Go to cataloguing/additem.pl for a biblio. Fill in the fields above
if required. Save
3) Remain on cataloguing/additem.pl. Notice the items table at the top
of the page, the dates are in the generic yyyy-mm-dd format
4) Go to catalogue/MARCdetail.pl for that biblio. Notice dates in wrong
format
5) View this biblio in the opac opac-MARCdetail.pl. Scroll to bottom to
items table. Notice dates in wrong format.
6) Apply patch, restart memcached and plack and refresh pages
7) Dates should now be formatted according to dateformat preference
8) Confirm that changing the preference changes the format of the dates

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
catalogue/MARCdetail.pl
cataloguing/additem.pl
opac/opac-MARCdetail.pl