Bug 29963: Do not prefill empty date fields with today's date
authorPetro Vashchuk <stalkernoid@gmail.com>
Fri, 3 Jun 2022 16:10:03 +0000 (19:10 +0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 17 Jun 2022 13:35:35 +0000 (10:35 -0300)
commit926def44c0e25c0ff6cb634a24dce3014075a3a3
treeede38cdc1153b7c9c68ca534adc247f01f5e3c3b
parent9b3e31222355d2353164ce18e48e31beefa50df0
Bug 29963: Do not prefill empty date fields with today's date

Revert "Bug 29815: Pre-populate 'Date acquired' field when adding/editing items"
commit bd197c64567fba6899f12e4897d786adf52384d8

Items date fields in MARC framework with dateaccessioned.pl assigned as
plugin automatically prefilled by it with today's date if empty on page
load.

This becomes big problem because it silently changes empty date fields
in single item edit form with today's date. This drastically degrades
UX because user won't noitce that fields were filled.

Also, even when user aware about this problem, user is forced to clean
the field manually each time they edit items with empty fields.

Also in item batch edit tool the probability heavily increases to make
mistake and leave those fields prefilled on mass.

To reproduce problem with single item edit:
1. Edit single item that doesn't have a date set in any of the date
fields where dateaccessioned.pl in MARC framework assigned as plugin,
see that the field got prefilled with today's date.
2. Save the item. See that it overwrote the previously empty date.
3. Apply the patch.
4. Edit single item again, and ensure that the empty date fields don't
get overwriten like it happened previously.

To reproduce problem with bath edit:
1. Edit items in batch for any biblio, see that the date fields where
dateaccessioned.pl in MARC framework assigned as plugin is automatically
 set to current day's date.
2. Apply the patch.
3. Check the fields again, they should be empty after that.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
cataloguing/value_builder/dateaccessioned.pl