Bugzilla – Attachment 129204 Details for
Bug 29815
Pre-populate 'Date acquired' field when adding/editing items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29815: Pre-fill 952$d (Date acquired) when receiving serial items
Bug-29815-Pre-fill-952d-Date-acquired-when-receivi.patch (text/plain), 1.43 KB, created by
Samu Heiskanen
on 2022-01-07 21:47:35 UTC
(
hide
)
Description:
Bug 29815: Pre-fill 952$d (Date acquired) when receiving serial items
Filename:
MIME Type:
Creator:
Samu Heiskanen
Created:
2022-01-07 21:47:35 UTC
Size:
1.43 KB
patch
obsolete
>From 07f9c641e86fede0b4a5b6109aa6735b8dc73b1c Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 13 Dec 2021 17:46:56 +0000 >Subject: [PATCH] Bug 29815: Pre-fill 952$d (Date acquired) when receiving > serial items > >Test plan: >1. Create a subscription >- Select the 'Create an item record when receiving this serial' >2. Receive the serial >3. After changing the status from 'Expected' to 'Arrived' notice that >the 'd - Date acquired' is not set until you click on that field >4. Apply patch and restart services >5. Receive the serial again and notice this time today's date is >pre-populated in 'd - Date acquired' > >Sponsored-By: Brimbank Library, Australia >Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> >--- > C4/Items.pm | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index ce285577bd..214af83b1e 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1673,6 +1673,11 @@ sub PrepareItemrecordDisplay { > $defaultvalue = $defaultvalues->{location}; > } > } >+ if ( $subfield->{kohafield} eq 'items.dateaccessioned' ) { >+ my $date = DateTime->now; >+ $date = $date->ymd; >+ $defaultvalue = $date; >+ } > if ( $subfield->{authorised_value} ) { > my @authorised_values; > my %authorised_lib; >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29815
:
129126
|
129127
|
129204
|
129237
|
133221
|
133343