@@ -, +, @@ --- cataloguing/addbiblio.pl | 4 +++- cataloguing/additem.pl | 2 ++ 2 files changed, 5 insertions(+), 1 deletions(-) --- a/cataloguing/addbiblio.pl +++ a/cataloguing/addbiblio.pl @@ -307,13 +307,15 @@ sub create_input { # get today date & replace YYYY, MM, DD if provided in the default value my ( $year, $month, $day ) = Today(); + my $shortyear = substr $year, 2, 2; $month = sprintf( "%02d", $month ); $day = sprintf( "%02d", $day ); $value =~ s/YYYY/$year/g; + $value =~ s/YY/$shortyear/g; $value =~ s/MM/$month/g; $value =~ s/DD/$day/g; my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); - $value=~s/user/$username/g; + $value=~s/USER/$username/g; } my $dbh = C4::Context->dbh; --- a/cataloguing/additem.pl +++ a/cataloguing/additem.pl @@ -125,7 +125,9 @@ sub generate_subfield_form { $value = $subfieldlib->{defaultvalue}; # get today date & replace YYYY, MM, DD if provided in the default value my ( $year, $month, $day ) = split ',', $today_iso; # FIXME: iso dates don't have commas! + my $shortyear = substr $year, 2, 2; $value =~ s/YYYY/$year/g; + $value =~ s/YY/$shortyear/g; $value =~ s/MM/$month/g; $value =~ s/DD/$day/g; } --