@@ -, +, @@ item subfields - This is best tested with an ACQ framework, but default can be used when no ACQ framework was created. - In your MARC bibliographic framework: - In 952 make itemtype, classification source and some other pull downs like location or collection mandatory and set them to visibel if needed - Create a new basket with 'items created while ordering' - Add a new order, an existing record with 942$c set will work best - Add items for your order line - Verify that the first value of each pull down is preselected, there is no way to trigger the 'required' error - Apply patch - Add a new order line - Verify that classification source is preselected according to the DefaultClassificationSource system preference (try unsetting it later) - Verify all mandatory fields can be set to empty - Verify that you can't save before correctly setting them - Change your frameworks and set a default for itemtype (Ex: BK) and another mandatory and non-mandatory field of your choice - Add a new order line and item and verify the defaults are selected --- C4/Items.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -1680,8 +1680,7 @@ sub PrepareItemrecordDisplay { #----- itemtypes } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { my $itemtypes = Koha::ItemTypes->search_with_localization; - push @authorised_values, "" - unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); + push @authorised_values, ""; while ( my $itemtype = $itemtypes->next ) { push @authorised_values, $itemtype->itemtype; $authorised_lib{$itemtype->itemtype} = $itemtype->translated_description; @@ -1692,7 +1691,7 @@ sub PrepareItemrecordDisplay { #---- class_sources } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "cn_source" ) { - push @authorised_values, "" unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); + push @authorised_values, ""; my $class_sources = GetClassSources(); my $default_source = $defaultvalue || C4::Context->preference("DefaultClassificationSource"); @@ -1712,8 +1711,7 @@ sub PrepareItemrecordDisplay { $tagslib->{$tag}->{$subfield}->{authorised_value}, $branch_limit ? $branch_limit : () ); - push @authorised_values, "" - unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); + push @authorised_values, ""; while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) { push @authorised_values, $value; $authorised_lib{$value} = $lib; --