Bugzilla – Attachment 101270 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: Replace recently added occurrences
Bug-23463-Replace-recently-added-occurrences.patch (text/plain), 3.73 KB, created by
Jonathan Druart
on 2020-03-20 15:14:19 UTC
(
hide
)
Description:
Bug 23463: Replace recently added occurrences
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-20 15:14:19 UTC
Size:
3.73 KB
patch
obsolete
>From 725d068b1d1db497f604f2bfb560fbc2800d8104 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 2 Dec 2019 12:02:28 +0100 >Subject: [PATCH] Bug 23463: Replace recently added occurrences > >Few occurrences have been added since this patchset has been originaly >written > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Checkout.pm | 2 +- > Koha/Item.pm | 10 ---------- > t/db_dependent/Circulation.t | 2 +- > .../Koha/Plugins/Biblio_and_Items_plugin_hooks.t | 4 ++-- > 4 files changed, 4 insertions(+), 14 deletions(-) > >diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm >index 72cf41b9e0..e256b6c051 100644 >--- a/Koha/Checkout.pm >+++ b/Koha/Checkout.pm >@@ -137,7 +137,7 @@ sub claim_returned { > )->store(); > > my $ClaimReturnedLostValue = C4::Context->preference('ClaimReturnedLostValue'); >- C4::Items::ModItem( { itemlost => $ClaimReturnedLostValue }, undef, $self->itemnumber ); >+ $self->item->itemlost($ClaimReturnedLostValue)->store; > > my $ClaimReturnedChargeFee = C4::Context->preference('ClaimReturnedChargeFee'); > $charge_lost_fee = >diff --git a/Koha/Item.pm b/Koha/Item.pm >index bb08653702..cc4c772b1b 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -603,16 +603,6 @@ sub current_holds { > return Koha::Holds->_new_from_dbic($hold_rs); > } > >-=head3 holds >- >-=cut >- >-sub holds { >- my ( $self ) = @_; >- my $hold_rs = $self->_result->reserves->search; >- return Koha::Holds->_new_from_dbic($hold_rs); >-} >- > =head3 stockrotationitem > > my $sritem = Koha::Item->stockrotationitem; >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index babe72b322..58ec966c17 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3007,7 +3007,7 @@ subtest 'Cancel transfers on lost items' => sub { > is( $itemcheck->holdingbranch, $library_1->{branchcode}, 'Items holding branch is the transfers origin branch before it is marked as lost' ); > > #Simulate item being marked as lost and confirm the transfer is deleted and the items holding branch is the transfers source branch >- ModItem( { itemlost => 1 }, $item->biblionumber, $item->itemnumber ); >+ $item->itemlost(1)->store; > LostItem( $item->itemnumber, 'test', 1 ); > ($datesent,$frombranch,$tobranch) = GetTransfers($item->itemnumber); > is( $tobranch, undef, 'The transfer on the lost item has been deleted as the LostItemCancelOutstandingTransfer is enabled'); >diff --git a/t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t b/t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t >index 99dacec4dd..18a138c778 100755 >--- a/t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t >+++ b/t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t >@@ -68,11 +68,11 @@ subtest 'after_biblio_action() and after_item_action() hooks tests' => sub { > qr/after_item_action called with action: create, ref: Koha::Item/, > 'AddItem calls the hook with action=create'; > >- warning_like { C4::Items::ModItem({ location => 'shelves' }, $biblio_id, $item->itemnumber); } >+ warning_like { $item->location('shelves')->store; } > qr/after_item_action called with action: modify, ref: Koha::Item/, > 'ModItem calls the hook with action=modify'; > >- warning_like { C4::Items::DelItem({ itemnumber => $item->itemnumber }); } >+ warning_like { $item->delete; } > qr/after_item_action called with action: delete/, > 'DelItem calls the hook with action=delete, item_id passed'; > >-- >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 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