Bugzilla – Attachment 122230 Details for
Bug 28608
Creating a biblio record leads to item creation even if framework has no items field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28608: Creating a biblio record must not lead to item creation when framework has no items field
Bug-28608-Creating-a-biblio-record-must-not-lead-t.patch (text/plain), 3.55 KB, created by
Fridolin Somers
on 2021-06-21 14:14:09 UTC
(
hide
)
Description:
Bug 28608: Creating a biblio record must not lead to item creation when framework has no items field
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2021-06-21 14:14:09 UTC
Size:
3.55 KB
patch
obsolete
>From 8aec868a6f2f7f9e435bc865cfc0c6199f9c3107 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 21 Jun 2021 16:06:34 +0200 >Subject: [PATCH] Bug 28608: Creating a biblio record must not lead to item > creation when framework has no items field > >Some framework for biblio records have no items field (952 in MARC21, 995 in UNIMARC). Records can not have items for example a serial article. > >In this case creating a record should not lead to item creation. > >This patch adds a condition next to items edition permission to have >only one save button when framework has no items field. > >1) Create a biblio framework without items field (952 in MARC21, 995 in UNIMARC) >2) Create a biblio record with this framework >3) Click on "Save" >=> Without patch you see items creation page (with no inputs in form) >=> With patch you see record details page >--- > cataloguing/addbiblio.pl | 5 +++-- > .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 7eba09f55d..1d6a4de046 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -51,7 +51,7 @@ if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) { > MARC::File::XML->default_record_format('UNIMARC'); > } > >-our($tagslib,$authorised_values_sth,$is_a_modif,$usedTagsLib,$mandatory_z3950); >+our($tagslib,$authorised_values_sth,$is_a_modif,$usedTagsLib,$mandatory_z3950,$itemtag,$itemsubfield); > > =head1 FUNCTIONS > >@@ -500,7 +500,6 @@ sub build_tabs { > my @tab_data; # all tags to display > > my $max_num_tab=-1; >- my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber" ); > foreach my $used ( @$usedTagsLib ){ > > push @tab_data,$used->{tagfield} if not $seen{$used->{tagfield}}; >@@ -772,6 +771,7 @@ $template->param( > $tagslib = &GetMarcStructure( 1, $frameworkcode ); > $usedTagsLib = &GetUsedMarcStructure( $frameworkcode ); > $mandatory_z3950 = GetMandatoryFieldZ3950($frameworkcode); >+( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber" ); > # -- Global > > my $record = -1; >@@ -981,6 +981,7 @@ if ( $record ne '-1' ) { > $template->param( > popup => $mode, > frameworkcode => $frameworkcode, >+ framework_has_items => $tagslib->{$itemtag} ? 1 : 0, > itemtype => $frameworkcode, > borrowernumber => $loggedinuser, > tab => scalar $input->param('tab') >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 00c6767d1a..d7e228dcf3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -785,7 +785,7 @@ function PopupMARCFieldDoc(field) { > [% END %] > > <div id="toolbar" class="btn-toolbar"> >- [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] >+ [% IF ( CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) ) and framework_has_items %] > [% 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-default"><i class="fa fa-save"></i> Save</a></div> >-- >2.30.2
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 28608
:
122230
|
122254
|
122255