Bugzilla – Attachment 144693 Details for
Bug 32456
Date accessioned is now cleared when items are replaced
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32456: Preserve date accessioned if a date is not explicitly passed
Bug-32456-Preserve-date-accessioned-if-a-date-is-n.patch (text/plain), 1.74 KB, created by
Nick Clemens (kidclamp)
on 2022-12-16 15:48:27 UTC
(
hide
)
Description:
Bug 32456: Preserve date accessioned if a date is not explicitly passed
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-12-16 15:48:27 UTC
Size:
1.74 KB
patch
obsolete
>From c45933d197d332431e76569220ed3f49bf4af610 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 13 Dec 2022 14:24:13 +0000 >Subject: [PATCH] Bug 32456: Preserve date accessioned if a date is not > explicitly passed > >To test: > 1 - Edit an item record to have a blank date accessioned > 2 - Save the record as marcxml from the detail page > 3 - Edit the item to have an accession date > 4 - Stage and import the file - matching in KohaBiblio and replacing items > 5 - Import the file > 6 - Confirm the date accessioned is cleared > 7 - Apply patch > 8 - Provide an accession date for the item > 9 - Stage and import the file again >10 - Confirm the date remained >11 - Edit the item to remove the date >12 - Confirm you can manually blank the field > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Items.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 9d443bb6ec..51c506ee49 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -307,6 +307,10 @@ sub ModItemFromMarc { > # to prevent it being blanked by set_or_blank > $item->{onloan} = $item_object->onloan if( $item_object->onloan && !defined $item->{onloan} ); > >+ # When importing and replacing items we should not remove the dateacquired so we should set it >+ # to the existing value >+ $item->{dateaccessioned} = $item_object->dateaccessioned if( $item_object->dateaccessioned && !defined $item->{dateaccessioned} ); >+ > my ( $perm_loc_tag, $perm_loc_subfield ) = C4::Biblio::GetMarcFromKohaField( "items.permanent_location" ); > my $has_permanent_location = defined $perm_loc_tag && defined $item_marc->subfield( $perm_loc_tag, $perm_loc_subfield ); > >-- >2.30.2
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 32456
:
144553
|
144593
|
144637
|
144692
|
144693
|
144740
|
144741
|
144851