Bugzilla – Attachment 123006 Details for
Bug 27526
Remove Mod/AddItemFromMarc from additem.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27526: Remove uneeded call to TransformMarcToKoha
Bug-27526-Remove-uneeded-call-to-TransformMarcToKo.patch (text/plain), 9.06 KB, created by
Jonathan Druart
on 2021-07-21 08:30:32 UTC
(
hide
)
Description:
Bug 27526: Remove uneeded call to TransformMarcToKoha
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-07-21 08:30:32 UTC
Size:
9.06 KB
patch
obsolete
>From 6b49fa416ba4d94bd2b061d92d18c59f7f21775c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 20 Jul 2021 14:49:48 +0200 >Subject: [PATCH] Bug 27526: Remove uneeded call to TransformMarcToKoha > >And also clean some imports. >--- > cataloguing/additem.pl | 9 +------- > .../prog/en/modules/cataloguing/additem.tt | 22 +++++++++---------- > 2 files changed, 12 insertions(+), 19 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 9150ad2b785..0212b0d4c72 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -25,17 +25,13 @@ use CGI qw ( -utf8 ); > use C4::Auth qw( get_template_and_user haspermission ); > use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); > use C4::Biblio qw( >- GetAuthorisedValueDesc > GetFrameworkCode > GetMarcBiblio > GetMarcFromKohaField > GetMarcStructure > IsMarcStructureInternal > ModBiblio >- TransformHtmlToXml >- TransformMarcToKoha > ); >-use C4::Items qw( AddItemFromMarc ModItemFromMarc ); > use C4::Context; > use C4::Circulation qw( LostItem ); > use C4::Koha qw( GetAuthorisedValues ); >@@ -411,7 +407,6 @@ my $record = GetMarcBiblio({ biblionumber => $biblionumber }); > output_and_exit_if_error( $input, $cookie, $template, > { module => 'cataloguing', record => $record } ); > >-my $oldrecord = TransformMarcToKoha($record); > my $current_item; > my $nextop="additem"; > my @errors; # store errors found while checking data BEFORE saving item. >@@ -900,9 +895,7 @@ foreach my $tag ( keys %{$tagslib} ) { > > # what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit. > $template->param( >- biblionumber => $biblionumber, >- title => $oldrecord->{title}, >- author => $oldrecord->{author}, >+ biblio => $biblio, > items => \@items, > item_header_loop => \@header_value_loop, > subfields => \@subfields, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 7cd183a1fba..345329ecc7a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -5,7 +5,7 @@ > [% USE KohaDates %] > [% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>Items › [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %]) › Cataloging › Koha</title> >+<title>Items › [% biblio.title | html %] [% IF ( author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %]) › Cataloging › Koha</title> > [% INCLUDE 'doc-head-close.inc' %] > [% Asset.css("css/addbiblio.css") | $raw %] > [% INCLUDE 'datatables.inc' %] >@@ -34,7 +34,7 @@ > <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> > </li> > <li> >- <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]">Edit <em>[% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %])</em></a> >+ <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblio.biblionumber | uri %]">Edit <em>[% biblio.title | html %] [% IF ( author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %])</em></a> > </li> > <li> > <a href="#" aria-current="page"> >@@ -49,14 +49,14 @@ > <div class="col-sm-12"> > <main> > [% INCLUDE 'blocking_errors.inc' %] >-<h1>Items for [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %])</h1> >+<h1>Items for [% biblio.title | html %] [% IF ( author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %])</h1> > > [% IF ( barcode_not_unique ) %]<div class="dialog alert"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %] > [% IF ( no_next_barcode ) %]<div class="dialog alert"><strong>Error saving items</strong>: Unable to automatically determine values for barcodes. No item has been inserted.</div>[% END %] > [% IF ( book_on_loan ) %]<div class="dialog alert"><strong>Cannot delete</strong>: item is checked out.</div>[% END %] > [% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot delete</strong>: item has a waiting hold.</div>[% END %] > [% IF ( not_same_branch ) %]<div class="dialog alert"><strong>Cannot delete</strong>: The items do not belong to your library.</div>[% END %] >-[% IF ( linked_analytics ) %]<div class="dialog alert"><strong>Cannot delete</strong>: item has linked <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&analyze=1">analytics.</a>.</div>[% END %] >+[% IF ( linked_analytics ) %]<div class="dialog alert"><strong>Cannot delete</strong>: item has linked <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]&analyze=1">analytics.</a>.</div>[% END %] > [% IF last_item_for_hold %]<div class="dialog alert"><strong>Cannot delete</strong>: Last item for bibliographic record with biblio-level hold on it.</div>[% END %] > > <div id="cataloguing_additem_itemlist"> >@@ -104,11 +104,11 @@ > </a> > <ul class="dropdown-menu" role="menu" aria-labelledby="itemactions[% item.itemnumber | html %]"> > >- [% IF item.biblionumber != biblionumber %] [%# Host item %] >- <li><a href="additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]#edititem">Edit in host</a> <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&biblionumber=[% biblionumber | html %]&hostitemnumber=[% item.itemnumber | html %]&searchid=[% searchid | html %]">Delink</a></li> >+ [% IF item.biblionumber != biblio.biblionumber %] [%# Host item %] >+ <li><a href="additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]#edititem">Edit in host</a> <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&biblionumber=[% biblio.biblionumber | html %]&hostitemnumber=[% item.itemnumber | html %]&searchid=[% searchid | html %]">Delink</a></li> > [% ELSE %] >- <li><a href="additem.pl?op=edititem&biblionumber=[% biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]&searchid=[% searchid | uri %]#edititem">Edit</a></li> >- <li><a href="additem.pl?op=dupeitem&biblionumber=[% biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]&searchid=[% searchid | uri %]#additema">Duplicate</a></li> >+ <li><a href="additem.pl?op=edititem&biblionumber=[% biblio.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]&searchid=[% searchid | uri %]#edititem">Edit</a></li> >+ <li><a href="additem.pl?op=dupeitem&biblionumber=[% biblio.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]&searchid=[% searchid | uri %]#additema">Duplicate</a></li> > <li class="print_label"><a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=add&number_type=itemnumber&number_list=[% item.itemnumber | uri %]" target="_blank" >Print label</a></li> > <li><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]&searchid=[% searchid | html %]" onclick="return confirm_deletion();">Delete</a></li> > [% END %] >@@ -141,12 +141,12 @@ > <div class="col-sm-10"> > > <div id="cataloguing_additem_newitem"> >- <form id="f" method="post" action="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]" name="f"> >+ <form id="f" method="post" action="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblio.biblionumber | html %]" name="f"> > <input type="hidden" name="op" value="[% op | html %]" /> > [% IF (popup) %] > <input type="hidden" name="popup" value="1" /> > [% END %] >- <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> >+ <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" /> > [% IF op != 'saveitem' %] > <h2 id="additema">Add item [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]</h2> > [% ELSE %] >@@ -277,7 +277,7 @@ > [% END %] > <input type="submit" value="Save changes" onclick="return Check(this.form)"> > <input type="button" id="addnewitem" value="Add a new item"> >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Cancel</a> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a> > [% END %]</fieldset> > > [%# Fields for fast cataloging %] >-- >2.20.1
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 27526
:
115679
|
115680
|
116006
|
117806
|
117807
|
117808
|
121589
|
121590
|
121591
|
122288
|
122318
|
122655
|
122656
|
122657
|
122658
|
122676
|
122677
|
122681
|
122682
|
122694
|
122695
|
122696
|
122946
|
122947
|
122948
|
122949
|
122950
|
122951
|
122952
|
122953
|
122954
|
122957
|
122958
|
122959
|
122974
|
123006
|
123007
|
123110
|
123329
|
123372
|
123415
|
123757
|
123758
|
123759
|
123760
|
123761
|
123762
|
123763
|
123764
|
123765
|
123766
|
123767
|
123768
|
123769
|
123770
|
123771
|
123772
|
125069
|
125605
|
125606
|
125607
|
125608
|
125609
|
125610
|
125611
|
125612
|
125613
|
125614
|
125615
|
125616
|
125617
|
125618
|
125619
|
125620
|
125818
|
125839
|
125863
|
126034
|
126051
|
126143
|
126144
|
126393
|
127025
|
127032