From 3062405c0989bfd34422ed6d1118cf8b98a84865 Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Thu, 15 Dec 2011 08:21:56 -0500 Subject: [PATCH] Bug 5533 followup: reinstate Lost status editing The original patch for 5533 removed the Lost status from the edit items screen; new items were not affected, and batch changes could still be made, so this was not a consistent change. This patch removes the filter that hid the Lost status dropdown, but then changes the default MARC framework to hide this field by default (value -5). New installations will not see this status in the editor, unless they manually activate it. This will enforce the semantics of using the "mark lost" options by default, but provide a workaround for libraries that understand and accept the consequences of manually editing this field. To test: 1. on an existing install, edit an item. you should have the Lost status visible 2. on a new install, editing or creating an item should not show the Lost status at all Signed-off-by: Chris Cormack Signed-off-by: Paul Poulain --- cataloguing/additem.pl | 2 -- .../marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 4442ed328a..979efae1a1 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -670,8 +670,6 @@ if($itemrecord){ next if subfield_is_koha_internal_p($subfieldtag); next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); - $subfieldlib->{hidden} = 1 - if $tagslib->{$tag}->{$subfieldtag}->{authorised_value} eq 'LOST'; my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i); push @fields, "$tag$subfieldtag"; diff --git a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index 8e817ffcd8..30fa334aca 100644 --- a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -104,7 +104,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('952', '0', 'Withdrawn status', 'Withdrawn status', 0, 0, 'items.wthdrawn', 10, 'WITHDRAWN', '', '', 0, 0, '', '', '', NULL), - ('952', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL), + ('952', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, -5, '', '', '', NULL), ('952', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'items.cn_source', 10, 'cn_source', '', '', NULL, 0, '', '', '', NULL), ('952', '3', 'Materials specified (bound volume or other part)', 'Materials specified (bound volume or other part)', 0, 0, 'items.materials', 10, '', '', '', NULL, -1, '', '', '', NULL), ('952', '4', 'Damaged status', 'Damaged status', 0, 0, 'items.damaged', 10, 'DAMAGED', '', '', NULL, 0, '', '', '', NULL), -- 2.39.5