From add825664dbb5e37da7eb2762868e17966046d48 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Mon, 7 Mar 2022 04:37:12 +0000 Subject: [PATCH] Bug 23352: (follow-up) Fixes for QA review Test plan: 1. Confirm that installer/data/mysql/atomicupdate/bug_23352-add_ccode_column_to_subscriptions_table.pl has the exec flag 2. Create a subscription. Notice the 'Collection' dropdown defaults to the 'None' option - same as Location 3. Save the subscription without changing the 'None' collection 4. Receive the serial and confirm the 'Collection' field is empty 5. Create a second subscription. Change the 'Collection' dropdown to 'Fiction', then save the subscription 6. Receive the serial and confirm the 'Collection' dropdown is set to 'Fiction' 7. Confirm that the 'Collection code' terminology in the template is replaced with 'Collection' Sponsored-By: Brimbank Library, Australia Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- C4/Items.pm | 5 +---- .../bug_23352-add_ccode_column_to_subscriptions_table.pl | 0 .../prog/en/modules/serials/subscription-add.tt | 5 +++-- .../prog/en/modules/serials/subscription-detail.tt | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) mode change 100644 => 100755 installer/data/mysql/atomicupdate/bug_23352-add_ccode_column_to_subscriptions_table.pl diff --git a/C4/Items.pm b/C4/Items.pm index 2a84d5f3e6..a2bb4011a4 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1698,10 +1698,7 @@ sub PrepareItemrecordDisplay { && $defaultvalues && $defaultvalues->{'ccode'} ) { - if ( $itemrecord and $defaultvalues and not $itemrecord->subfield($tag,$subfield->{subfield}) ) { - # if the item record exists, only use default value if the item has no ccode - $defaultvalue = $defaultvalues->{ccode}; - } elsif ( !$itemrecord and $defaultvalues ) { + if ( !$itemrecord and $defaultvalues ) { # if the item record *doesn't* exists, always use the default value $defaultvalue = $defaultvalues->{ccode}; } diff --git a/installer/data/mysql/atomicupdate/bug_23352-add_ccode_column_to_subscriptions_table.pl b/installer/data/mysql/atomicupdate/bug_23352-add_ccode_column_to_subscriptions_table.pl old mode 100644 new mode 100755 diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index 688fb9a370..53760cf4fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -200,10 +200,11 @@ fieldset.rows table { clear: none; margin: 0; }
  • - +