From fda29a7135631e2cba212248a8ab268c96d4d359 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 7 Jun 2022 08:27:25 +0100 Subject: [PATCH] Bug 29963: Restore original intention of bug 29815 This patch restores the original intended behaviour of bug 29815; To pre-populate the dateaccessioned field on item creations. --- C4/Items.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/C4/Items.pm b/C4/Items.pm index 9808fadd1f..9b21e89ce3 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1707,6 +1707,11 @@ sub PrepareItemrecordDisplay { $defaultvalue = $defaultvalues->{ccode}; } } + if ( $subfield->{kohafield} eq 'items.dateaccessioned' ) { + my $date = dt_from_string(); + $date = $date->ymd; + $defaultvalue = $date; + } if ( $subfield->{authorised_value} ) { my @authorised_values; my %authorised_lib; -- 2.20.1