Bugzilla – Attachment 95912 Details for
Bug 23463
Move C4::Items CRUD subroutines to Koha::Item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23463: Remove ModItem
Bug-23463-Remove-ModItem.patch (text/plain), 2.91 KB, created by
Jonathan Druart
on 2019-12-02 12:05:00 UTC
(
hide
)
Description:
Bug 23463: Remove ModItem
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-12-02 12:05:00 UTC
Size:
2.91 KB
patch
obsolete
>From 3f07d4894f11cff22bf7c46315e347471b0d30b9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 6 Aug 2019 11:14:25 -0500 >Subject: [PATCH] Bug 23463: Remove ModItem > >There should not be any calls left >--- > C4/Items.pm | 64 ------------------------------------------------------------- > 1 file changed, 64 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 97280f922b..99f06f6cd2 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -31,7 +31,6 @@ BEGIN { > AddItemBatchFromMarc > ModItemFromMarc > Item2Marc >- ModItem > ModDateLastSeen > ModItemTransfer > DelItem >@@ -375,69 +374,6 @@ sub ModItemFromMarc { > return $item_object->get_from_storage->unblessed; > } > >-=head2 ModItem >- >-ModItem( >- { column => $newvalue }, >- $biblionumber, >- $itemnumber, >- { >- [ unlinked_item_subfields => $unlinked_item_subfields, ] >- [ log_action => 1, ] >- } >-); >- >-Change one or more columns in an item record. >- >-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. >- >-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 >-the biblio items tag for display and indexing. >- >-If one of the changed columns is used to calculate >-the derived value of a column such as C<items.cn_sort>, >-this routine will perform the necessary calculation >-and set the value. >- >-If log_action is set to false, the action will not be logged. >-If log_action is true or undefined, the action will be logged. >- >-=cut >- >-sub ModItem { >- my ( $item, $biblionumber, $itemnumber, $additional_params ) = @_; >- my $log_action = $additional_params->{log_action} // 1; >- >- _set_derived_columns_for_mod($item); >- _do_column_fixes_for_mod($item); >- # FIXME add checks >- # duplicate barcode >- # attempt to change itemnumber >- # attempt to change biblionumber (if we want >- # an API to relink an item to a different bib, >- # it should be a separate function) >- >- # update items table >- _koha_modify_item($item); >- >- # request that bib be reindexed so that searching on current >- # item status is possible >- ModZebra( $biblionumber, "specialUpdate", "biblioserver" ); >- >- _after_item_action_hooks({ action => 'modify', item_id => $itemnumber }); >- >- logaction( "CATALOGUING", "MODIFY", $itemnumber, "item " . Dumper($item) ) >- if $log_action && C4::Context->preference("CataloguingLog"); >-} >- > =head2 ModItemTransfer > > ModItemTransfer($itenumber, $frombranch, $tobranch); >-- >2.11.0
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 23463
:
95899
|
95900
|
95901
|
95902
|
95903
|
95904
|
95905
|
95906
|
95907
|
95908
|
95909
|
95910
|
95911
|
95912
|
95913
|
95914
|
95915
|
95916
|
95917
|
95918
|
95919
|
95920
|
95921
|
95922
|
95923
|
95925
|
96145
|
97895
|
97896
|
97897
|
97898
|
97899
|
97900
|
97901
|
97902
|
97903
|
97904
|
97905
|
97906
|
97907
|
97908
|
97909
|
97910
|
97911
|
97912
|
97913
|
97914
|
97915
|
97916
|
97917
|
97918
|
97919
|
97920
|
97921
|
101151
|
101152
|
101153
|
101154
|
101156
|
101157
|
101158
|
101161
|
101163
|
101165
|
101167
|
101169
|
101170
|
101171
|
101172
|
101173
|
101174
|
101175
|
101176
|
101177
|
101178
|
101179
|
101180
|
101181
|
101182
|
101183
|
101184
|
101185
|
101186
|
101188
|
101189
|
101190
|
101191
|
101192
|
101193
|
101194
|
101195
|
101196
|
101197
|
101246
|
101247
|
101248
|
101249
|
101250
|
101251
|
101252
|
101253
|
101254
|
101255
|
101256
|
101257
|
101258
|
101259
|
101260
|
101261
|
101262
|
101263
|
101264
|
101265
|
101266
|
101267
|
101268
|
101269
|
101270
|
101271
|
101272
|
101273
|
101274
|
101275
|
101276
|
101277
|
101278
|
101279
|
101280
|
101281
|
101282
|
101283
|
101284
|
101413
|
101414
|
101415
|
101416
|
101432
|
101476
|
102071
|
103129
|
113581