@@ -, +, @@ mandatory subfields - Adapt your frameworks: - Make 942$c non-mandatory - In 952 make itemtype, classification source and some other pull downs like location or collection mandatory - Add a new item - 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 item - Verify that classification source is preselected according to the DefaultClassificationSource system preference - Verify that the itemtype is preselected according to 942$c in the bibliographic record - Verify all mandatory fields can be set to empty - Verify that you can't save before correctly setting them - Change the 942$c in the record to empty - Add another item - Verify the itemtype is now empty - Change your frameworks and set a default for itemtype (Ex: BK) - Repeat default check with another pull down like collection or location --- cataloguing/additem.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/cataloguing/additem.pl +++ a/cataloguing/additem.pl @@ -179,7 +179,7 @@ sub generate_subfield_form { } } elsif ( $subfieldlib->{authorised_value} eq "itemtypes" ) { - push @authorised_values, "" unless ( $subfieldlib->{mandatory} ); + push @authorised_values, ""; my $itemtypes = Koha::ItemTypes->search_with_localization; while ( my $itemtype = $itemtypes->next ) { push @authorised_values, $itemtype->itemtype; @@ -195,7 +195,7 @@ sub generate_subfield_form { #---- class_sources } elsif ( $subfieldlib->{authorised_value} eq "cn_source" ) { - push @authorised_values, "" unless ( $subfieldlib->{mandatory} ); + push @authorised_values, ""; my $class_sources = GetClassSources(); my $default_source = C4::Context->preference("DefaultClassificationSource"); @@ -212,7 +212,7 @@ sub generate_subfield_form { #---- "true" authorised value } else { - push @authorised_values, qq{} unless ( $subfieldlib->{mandatory} ); + push @authorised_values, qq{}; my $av = GetAuthorisedValues( $subfieldlib->{authorised_value} ); for my $r ( @$av ) { push @authorised_values, $r->{authorised_value}; --