Bugzilla – Attachment 186218 Details for
Bug 32773
Have the ability to have more than 1 Fast Add framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32773: (QA follow-up) Corrections
Bug-32773-QA-follow-up-Corrections.patch (text/plain), 15.92 KB, created by
Nick Clemens (kidclamp)
on 2025-09-05 14:45:30 UTC
(
hide
)
Description:
Bug 32773: (QA follow-up) Corrections
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-09-05 14:45:30 UTC
Size:
15.92 KB
patch
obsolete
>From 3488b4e2ad60c4724b957235b993d03a25c23172 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 5 Sep 2025 14:37:58 +0000 >Subject: [PATCH] Bug 32773: (QA follow-up) Corrections > >Add exec permission to DB update and add comment >Use 'is_fast_add' in conditionals, no need to check for 'FA' framework >Use already fetched biblio objects to get frameworkcode >Make capitlaization consistent >--- > Koha/Biblio.pm | 2 +- > Koha/Schema/Result/BiblioFramework.pm | 2 +- > catalogue/detail.pl | 2 +- > catalogue/moredetail.pl | 2 +- > installer/data/mysql/atomicupdate/bug_32773.pl | 4 ++-- > .../optional/marc21_sample_fastadd_framework.yml | 4 ++-- > .../optional/unimarc_sample_fastadd_framework.yml | 4 ++-- > installer/data/mysql/kohastructure.sql | 2 +- > .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 10 +++++----- > .../prog/en/modules/admin/biblio_framework.tt | 4 ++-- > .../prog/en/modules/cataloguing/addbiblio.tt | 6 +++--- > .../prog/en/modules/cataloguing/cataloging-home.tt | 4 ++-- > 12 files changed, 23 insertions(+), 23 deletions(-) > mode change 100644 => 100755 installer/data/mysql/atomicupdate/bug_32773.pl > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index e82e9f087c7..393bf6373eb 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -336,7 +336,7 @@ sub can_be_edited { > : 0; > > my $editcatalogue = >- $self->frameworkcode eq 'FA' || $is_fast_add >+ $is_fast_add > ? [ 'fast_cataloging', 'edit_catalogue' ] > : 'edit_catalogue'; > >diff --git a/Koha/Schema/Result/BiblioFramework.pm b/Koha/Schema/Result/BiblioFramework.pm >index 60075d8fb9f..86daf5d1104 100644 >--- a/Koha/Schema/Result/BiblioFramework.pm >+++ b/Koha/Schema/Result/BiblioFramework.pm >@@ -48,7 +48,7 @@ the description/name given to the framework > default_value: 0 > is_nullable: 0 > >-the ability to be used as a Fast Add framework >+the ability to be used as a Fast add framework > > =cut > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index f483caf11b4..8e5639b73e8 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -90,7 +90,7 @@ my $activetab = $query->param('activetab'); > my $biblionumber = $query->param('biblionumber'); > $biblionumber = HTML::Entities::encode($biblionumber); > my $biblio = Koha::Biblios->find($biblionumber); >-my $frameworkcode = &GetFrameworkCode($biblionumber); >+my $frameworkcode = $biblio->frameworkcode; > my $is_fast_add = > defined $frameworkcode && $frameworkcode ne '' > ? Koha::BiblioFrameworks->find($frameworkcode)->is_fast_add >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index 3a5975de5c4..bca643c49de 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -107,7 +107,7 @@ my $record = $biblio ? $biblio->metadata->record : undef; > output_and_exit( $query, $cookie, $template, 'unknown_biblio' ) > unless $biblio && $record; > >-my $fw = GetFrameworkCode($biblionumber); >+my $fw = $biblio->frameworkcode; > my $is_fast_add = Koha::BiblioFrameworks->find($fw)->is_fast_add; > my $all_items = $biblio->items->search_ordered; > >diff --git a/installer/data/mysql/atomicupdate/bug_32773.pl b/installer/data/mysql/atomicupdate/bug_32773.pl >old mode 100644 >new mode 100755 >index 20b6d747d27..dc9f81d0d1c >--- a/installer/data/mysql/atomicupdate/bug_32773.pl >+++ b/installer/data/mysql/atomicupdate/bug_32773.pl >@@ -3,7 +3,7 @@ use Koha::Installer::Output qw(say_warning say_failure say_success say_info); > > return { > bug_number => "32773", >- description => "Add ability to have more than 1 Fast Add framework", >+ description => "Add ability to have more than 1 Fast add framework", > up => sub { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; >@@ -12,7 +12,7 @@ return { > $dbh->do( > q{ > ALTER TABLE biblio_framework >- ADD COLUMN is_fast_add TINYINT(1) NOT NULL DEFAULT 0 >+ ADD COLUMN is_fast_add TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast add framework' > AFTER frameworktext; > } > ); >diff --git a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_sample_fastadd_framework.yml b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_sample_fastadd_framework.yml >index 74d4bb3a683..1672fc6967e 100644 >--- a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_sample_fastadd_framework.yml >+++ b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_sample_fastadd_framework.yml >@@ -23,7 +23,7 @@ > # ************************************************************* > > description: >- - "'FA', a 'Fast Add' minimal MARC21 framework suitable for ILL or on-the-fly cataloguing." >+ - "'FA', a 'Fast add' minimal MARC21 framework suitable for ILL or on-the-fly cataloguing." > > tables: > - biblio_framework: >@@ -31,7 +31,7 @@ tables: > multiline: [] > rows: > - frameworkcode: FA >- frameworktext: "Fast Add Framework" >+ frameworktext: "Fast add Framework" > > sql_statements: > - "INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) >diff --git a/installer/data/mysql/en/marcflavour/unimarc/optional/unimarc_sample_fastadd_framework.yml b/installer/data/mysql/en/marcflavour/unimarc/optional/unimarc_sample_fastadd_framework.yml >index 0653a51e76d..5353a9c0b92 100644 >--- a/installer/data/mysql/en/marcflavour/unimarc/optional/unimarc_sample_fastadd_framework.yml >+++ b/installer/data/mysql/en/marcflavour/unimarc/optional/unimarc_sample_fastadd_framework.yml >@@ -23,7 +23,7 @@ > # ************************************************************* > > description: >- - "'FA', a 'Fast Add' minimal UNIMARC framework suitable for ILL or on-the-fly cataloguing." >+ - "'FA', a 'Fast add' minimal UNIMARC framework suitable for ILL or on-the-fly cataloguing." > > tables: > - biblio_framework: >@@ -31,7 +31,7 @@ tables: > multiline: [] > rows: > - frameworkcode: FA >- frameworktext: "Fast Add Framework" >+ frameworktext: "Fast add Framework" > > sql_statements: > - "INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 72ef5c5f34a..db2fa83ed00 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1125,7 +1125,7 @@ DROP TABLE IF EXISTS `biblio_framework`; > CREATE TABLE `biblio_framework` ( > `frameworkcode` varchar(4) NOT NULL DEFAULT '' COMMENT 'the unique code assigned to the framework', > `frameworktext` varchar(255) NOT NULL DEFAULT '' COMMENT 'the description/name given to the framework', >- `is_fast_add` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast Add framework', >+ `is_fast_add` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast add framework', > PRIMARY KEY (`frameworkcode`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index a1067926c16..352d718c994 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -34,11 +34,11 @@ > </div> > [% END %] > >- [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %] >+ [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %] > <div class="btn-group"> > <button class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</button> > <ul class="dropdown-menu"> >- [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %] >+ [% IF CAN_user_editcatalogue_edit_catalogue || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %] > [% IF biblio.can_be_edited(logged_in_user) %] > <li><a class="dropdown-item" id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]">Edit record</a></li> > [% ELSE %] >@@ -58,7 +58,7 @@ > </li> > [% END %] > >- [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %] >+ [% IF CAN_user_editcatalogue_edit_items || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %] > <li><a class="dropdown-item" id="manageitems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]">Manage items</a></li> > [% END %] > >@@ -127,7 +127,7 @@ > <li><a class="dropdown-item" href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li> > [% END %] > >- [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %] >+ [% IF CAN_user_editcatalogue_edit_catalogue || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %] > [% IF ( count ) %] > <li > data-bs-toggle="tooltip" >@@ -158,7 +158,7 @@ > [% END %] > [% END %] > >- [% IF CAN_user_editcatalogue_delete_all_items or ( frameworkcode == 'FA' || is_fast_add and CAN_user_editcatalogue_fast_cataloging ) %] >+ [% IF CAN_user_editcatalogue_delete_all_items || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %] > [% IF ( count ) %] > <li> > <form action="/cgi-bin/koha/cataloguing/additem.pl" method="post"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >index edb865a706c..433c174e719 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >@@ -136,7 +136,7 @@ > <span class="required">Required</span> > </li> > <li> >- <label for="is_fast_add">Use as a Fast Add framework: </label> >+ <label for="is_fast_add">Use as a Fast add framework: </label> > [% IF framework.frameworkcode == 'FA' %] > <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" checked disabled /> > [% ELSIF framework.is_fast_add %] >@@ -305,7 +305,7 @@ > <td> > [% loo.frameworktext | html %] > [% IF loo.is_fast_add %] >- <span class="badge rounded-pill bg-secondary float-end">Fast Add</span> >+ <span class="badge rounded-pill bg-secondary float-end">Fast add</span> > [% END %] > </td> > <td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 8f0e70a9353..3433ed9e7f3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -901,7 +901,7 @@ > [% END %] > > <div id="toolbar" class="btn-toolbar sticky"> >- [% IF CAN_user_editcatalogue_edit_items or ( ( frameworkcode == 'FA' || is_fast_add ) and CAN_user_editcatalogue_fast_cataloging ) %] >+ [% IF CAN_user_editcatalogue_edit_items || ( is_fast_add && CAN_user_editcatalogue_fast_cataloging ) %] > [% IF (circborrowernumber) %][%# fast cataloging must lead to items %] > <!-- Action is under fast cataloging - Save button redirecting to items --> > <div class="btn-group"><a href="#" id="saveanditems" class="btn btn-primary"><i class="fa fa-save"></i> Save</a></div> >@@ -956,7 +956,7 @@ > [% ELSE %] > <i class="fa fa-fw"> </i> > [% END %] >- [% !framework ? 'Default' : framework.frameworktext | html %] >+ [% ( !framework ? 'Default' : framework.frameworktext ) | html %] > </a> > </li> > [% END %] >@@ -968,7 +968,7 @@ > [% END %] > [% END %] > [% IF CAN_user_editcatalogue_fast_cataloging %] >- <li><h6 class="dropdown-header">Change Fast Add framework</h6></li> >+ <li><h6 class="dropdown-header">Change Fast add framework</h6></li> > [% FOREACH framework IN frameworks %] > [% IF framework.is_fast_add %][% INCLUDE framework_link %][% END %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >index dd6f1f9509b..e4e03645187 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >@@ -42,7 +42,7 @@ > [% IF !framework.is_fast_add %]<li><a class="dropdown-item" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% framework.frameworktext | html %]</a></li>[% END %] > [% END %] > [% FOREACH framework IN frameworks %] >- [% IF loop.first %]<li><h6 class="dropdown-header">Fast Add frameworks</h6></li>[% END %] >+ [% IF loop.first %]<li><h6 class="dropdown-header">Fast add frameworks</h6></li>[% END %] > [% IF framework.is_fast_add %]<li><a class="dropdown-item" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% framework.frameworktext | html %]</a></li>[% END %] > [% END %] > </ul> >@@ -57,7 +57,7 @@ > [% IF !framework.is_fast_add %]<li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a class="dropdown-item" href="#">[% framework.frameworktext | html %]</a></li>[% END %] > [% END %] > [% FOREACH framework IN frameworks %] >- [% IF loop.first %]<li><h6 class="dropdown-header">Fast Add frameworks</h6></li>[% END %] >+ [% IF loop.first %]<li><h6 class="dropdown-header">Fast add frameworks</h6></li>[% END %] > [% IF framework.is_fast_add %]<li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a class="dropdown-item" href="#">[% framework.frameworktext | html %]</a></li>[% END %] > [% END %] > </ul> >-- >2.39.5
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 32773
:
173401
|
173417
|
173878
|
173879
|
173880
|
173881
|
173882
|
173883
|
173954
|
173955
|
173956
|
173957
|
173958
|
173959
|
173960
|
173961
|
174028
|
174029
|
174030
|
174031
|
174032
|
174033
|
174034
|
174035
|
176927
|
176928
|
176929
|
176930
|
176931
|
176932
|
176933
|
176934
|
176935
|
177860
|
177861
|
177862
|
177863
|
177864
|
177865
|
177866
|
177867
|
186210
|
186211
|
186212
|
186213
|
186214
|
186215
|
186216
|
186217
|
186218
|
186219
|
186220
|
186221
|
186222
|
186223
|
186224
|
186225
|
186226
|
186227