Bug 14950: Assign default value for YYYY, MM and DD
authorMarc Véron <veron@veron.ch>
Sun, 4 Oct 2015 18:11:26 +0000 (20:11 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 6 Oct 2015 13:27:39 +0000 (10:27 -0300)
commitd17cb79309c896a0d9b7fb3babdf6fa3b1cfefd7
tree18290b76ff638b92c8e335a3caf54d765bd729a5
parente954c98199548995ead5a839376971c1615cea9a
Bug 14950: Assign default value for YYYY, MM and DD

[was Remove C4::Dates from tools/batchMod.pl]

This patch replace the YYYY, MM and DD if defined in the default values.

This patch also removes C4::Dates from tools/batchMod.pl

To test:

- In MARC bibliographic Default framework, define a default value
  for one of the in Tag 952 Subfield struture, e.g. for
  subfield x Non-public note. You can define it under
  'Advancde constraints'. Define the value similar to the following:
  Year:YYYY Month:MM Day:DD
- Got to Home > Tools > Batch item modification
- Enter one ore more barcodes you want to modify
- Check checkbox 'Populate fields with defautl values from defautl framework
- Click 'Continue'
- Verify on the follwing screen that the field in Edit form is populated
  as appropriate (in our example 'x - Non public note')
- Click 'Save'
- Verify that the items are updated as appropriate

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended commit message: This is a bug fix and can be backported. The
YYYY, MM and DD were not replaced correctly before this patch.
I got Year:2015-10-06 Month: Day:
now I correctly get Year: 2015 Month: 10 Day: 06
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
tools/batchMod.pl