From 6d30bfad9bbe8517137176d7ae24258d2c601454 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 31 Oct 2016 10:28:15 +0100 Subject: [PATCH] Bug 17519: Item editor handles clearing dateaccessioned and replacementpricedate inconsistently Content-Type: text/plain; charset=utf-8 This patch adds dateaccessioned to the hash built by Items routine _build_default_values_for_mod_marc, used in ModItemFromMarc when modifying an item. Normally, dateaccessioned will already have a value, and this change has no effect. The only exception is: when you modify an item and for some reason want to clear the dateaccessioned field, the item editor did not respond to that change. This change makes it possible to do so. This is consistent with the other date in the item editor (replacementpricedate) where you can already clear the date. Test plan: [1] Do not yet apply this patch. [2] Try to clear date acquired and replacementpricedate in the Item editor. Save and check results. You should still find the original date acquired in the saved record. [3] Apply the patch (restart Plack?), restore replacementpricedate, and repeat step 2. Both dates should be cleared. --- C4/Items.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Items.pm b/C4/Items.pm index baafdc2..9c3cc09 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -474,6 +474,7 @@ sub _build_default_values_for_mod_marc { coded_location_qualifier => undef, copynumber => undef, damaged => 0, + dateaccessioned => undef, enumchron => undef, holdingbranch => undef, homebranch => undef, -- 1.7.10.4