Bugzilla – Attachment 73732 Details for
Bug 18816
Make CataloguingLog work in production by preventing circulation from spamming the log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18816: (QA follow-up) Framework parameter is not needed
Bug-18816-QA-follow-up-Framework-parameter-is-not-.patch (text/plain), 2.73 KB, created by
Marcel de Rooy
on 2018-04-06 06:10:58 UTC
(
hide
)
Description:
Bug 18816: (QA follow-up) Framework parameter is not needed
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-04-06 06:10:58 UTC
Size:
2.73 KB
patch
obsolete
>From 64c7f0515e9d712701c9043e27e2be9322c50a62 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 6 Apr 2018 07:57:32 +0200 >Subject: [PATCH] Bug 18816: (QA follow-up) Framework parameter is not needed >Content-Type: text/plain; charset=utf-8 > >$frameworkcode is not used in ModItem (no need to pass it in >ModItemFromMarc). >$dbh is not used in ModItem. > >Test plan: >Run t/db_dependent/Items.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Items.pm | 18 ++++++------------ > 1 file changed, 6 insertions(+), 12 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index e39ebf7..e7279ff 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -510,7 +510,7 @@ sub ModItemFromMarc { > } > my $unlinked_item_subfields = _get_unlinked_item_subfields( $localitemmarc, $frameworkcode ); > >- ModItem($item, $biblionumber, $itemnumber, { frameworkcode => $frameworkcode, unlinked_item_subfields => $unlinked_item_subfields } ); >+ ModItem( $item, $biblionumber, $itemnumber, { unlinked_item_subfields => $unlinked_item_subfields } ); > return $item; > } > >@@ -522,7 +522,6 @@ ModItem( > $itemnumber, > { > [ unlinked_item_subfields => $unlinked_item_subfields, ] >- [ frameworkcode => $frameworkcode, ] > [ log_action => 1, ] > } > ); >@@ -533,9 +532,11 @@ the MARC representation of the item. > The first argument is a hashref mapping from item column > names to the new values. The second and third arguments > are the biblionumber and itemnumber, respectively. >+The fourth, optional parameter (additional_params) may contain the keys >+unlinked_item_subfields and log_action. > >-The fourth, optional parameter, C<$unlinked_item_subfields>, contains >-an arrayref containing subfields present in the original MARC >+C<$unlinked_item_subfields> contains an arrayref containing >+subfields present in the original MARC > representation of the item (e.g., from the item editor) that are > not mapped to C<items> columns directly but should instead > be stored in C<items.more_subfields_xml> and included in >@@ -552,16 +553,9 @@ If log_action is true or undefined, the action will be logged. > =cut > > sub ModItem { >- my $item = shift; >- my $biblionumber = shift; >- my $itemnumber = shift; >- my $additional_params = shift; >- >- my $dbh = C4::Context->dbh; >- >+ my ( $item, $biblionumber, $itemnumber, $additional_params ) = @_; > my $log_action = $additional_params->{log_action} // 1; > my $unlinked_item_subfields = $additional_params->{unlinked_item_subfields}; >- my $frameworkcode = $additional_params->{frameworkcode} || C4::Biblio::GetFrameworkCode($biblionumber); > > # if $biblionumber is undefined, get it from the current item > unless (defined $biblionumber) { >-- >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 18816
:
64383
|
64393
|
65711
|
65712
|
68600
|
68647
|
73154
|
73155
|
73169
|
73170
|
73171
|
73729
|
73730
|
73731
| 73732 |
73733