Bug 29815: Pre-populate 'Date acquired' field when adding/editing items
authorAlex Buckley <alexbuckley@catalyst.net.nz>
Mon, 10 Jan 2022 04:27:27 +0000 (04:27 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 21 Apr 2022 06:43:14 +0000 (20:43 -1000)
commitbd197c64567fba6899f12e4897d786adf52384d8
tree36af9794dc2615d7bb3d6f7128fc088ac0b8cc33
parentf55b16145c96167afc63784447cdb8420d49dbae
Bug 29815: Pre-populate 'Date acquired' field when adding/editing items

This patch pre-fills the 952$d (Date acquired) item subfield on page
load. Users can still click on the field to fill this subfield.

Test plan:
1. Visit a biblio. Add an item, observe on page load the 'Date acquired' subfield is
empty
2. Visit a subscription. Receive a serial, observe after setting the serial status to 'Arrived' the item form loads with an empty 'Date acquired' subfield
3. Apply patch and restart services
4. Repeat step 1 and confirm now on page load the 'Date acquired'
subfield populates with today's date
5. Delete the populated 'Date acquired' subfield value. Click in the
field and confirm the field is populated and the calendar input displays
6. Delete the 'Date acquired' subfield value again. Confirm that tabbing
from a different field into the date acquired field behaves the same as
click
7. Repeat step 2. This time confirm on page load the 'Date acquired' subfield
contains the current date
8. Delete the populated 'Date acquired' subfield value. Click in the
field and confirm it is populated
9. Delete the populated 'Date acquired' subfield value. Tab to the field
from another field and confirm it behaves the same as click
10. Visit a biblio. Edit an item with a date acquired value in
the past. Confirm the date acquired value is unchanged after saving.

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
cataloguing/value_builder/dateaccessioned.pl