Bugzilla – Attachment 77445 Details for
Bug 14662
Allow blank values in pull downs in cataloguing forms when subfield is mandatory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14662: Add empty entries to pull downs in cataloguing form for mandatory subfields
Bug-14662-Add-empty-entries-to-pull-downs-in-catal.patch (text/plain), 2.80 KB, created by
Owen Leonard
on 2018-08-02 14:08:17 UTC
(
hide
)
Description:
Bug 14662: Add empty entries to pull downs in cataloguing form for mandatory subfields
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-08-02 14:08:17 UTC
Size:
2.80 KB
patch
obsolete
>From fbdf410a3a9b511d4b74d53eeee11819115bcd8e Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Thu, 2 Aug 2018 15:56:11 +0200 >Subject: [PATCH] Bug 14662: Add empty entries to pull downs in cataloguing > form for mandatory subfields > >First patch deals with the problem on the item form, this >patch fixes the same problem on catalouging form for the >bibliographic record. > >To test: >- Adapt your frameworks: > - Make sure 942$c is mandatory > - Link another field to an authorised value, for example: 942$n to YESNO >- Add a new record > - Verify that the first value of each pull down is preselected, > there is no way to trigger the 'required' error >- Apply patch > - Add a record > - Verify that classification source is preselected according to the > DefaultClassificationSource system preference > - Verify that 942$c now defaults to empty > - Verify all your other mandatory subfields can be set to empty > - Verify that you can't save before correctly setting them > - Chane your frameworks > - Add a default value for 942$c, for example: CF > - Add another record > - Verify the itemtype is now preset to your default itemtype > - Edit an existing record, verify all values show correctly > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > cataloguing/addbiblio.pl | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 75db464..11c6d38 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -178,9 +178,7 @@ sub build_authorized_values_list { > } > } > elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { >- push @authorised_values, "" >- unless ( $tagslib->{$tag}->{$subfield}->{mandatory} >- && ( $value || $tagslib->{$tag}->{$subfield}->{defaultvalue} ) ); >+ push @authorised_values, ""; > > my $itemtype; > my $itemtypes = Koha::ItemTypes->search_with_localization; >@@ -191,8 +189,7 @@ sub build_authorized_values_list { > $value = $itemtype unless ($value); > } > elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "cn_source" ) { >- push @authorised_values, "" >- unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); >+ push @authorised_values, ""; > > my $class_sources = GetClassSources(); > >@@ -214,9 +211,7 @@ sub build_authorized_values_list { > $branch_limit ? $branch_limit : (), > ); > >- push @authorised_values, "" >- unless ( $tagslib->{$tag}->{$subfield}->{mandatory} >- && ( $value || $tagslib->{$tag}->{$subfield}->{defaultvalue} ) ); >+ push @authorised_values, ""; > > while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) { > push @authorised_values, $value; >-- >2.1.4
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 14662
:
77419
|
77443
|
77444
|
77445
|
77490
|
77491