Bugzilla – Attachment 120105 Details for
Bug 27281
Replace call to `C4::Circulation::DeleteTransfer` with `Koha::Item::Transfer->cancel({ comment => $comment })` in `C4::Circulation::LostItem`
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27281: (QA follow-up) Fix Indexer Test
Bug-27281-QA-follow-up-Fix-Indexer-Test.patch (text/plain), 3.82 KB, created by
Martin Renvoize (ashimema)
on 2021-04-23 13:53:30 UTC
(
hide
)
Description:
Bug 27281: (QA follow-up) Fix Indexer Test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-23 13:53:30 UTC
Size:
3.82 KB
patch
obsolete
>From 0ea4e72a450f0548389b737bb747ce074a068ff6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 23 Apr 2021 14:37:28 +0100 >Subject: [PATCH] Bug 27281: (QA follow-up) Fix Indexer Test > >With bug 27281 we removed a call to reset an items holdingbranch back to >the 'frombranch' of the transfer. This is correct, as with bug 23129 >(and friends) we ensure that the holdingbranch was not changed at >transfer request time and instead would only be updated at the reciept >of transfer. As such, it's safe to remove the update here as it would be >just setting the same branch as is already present. > >However, when removing this ModItem call, I neglected to realise that >also remoes the requirement for passing around the defered indexing bit >as we no longer need to trigger a re-index as there's not any change to >the item. > >This patch therefore cleans up the POD for LostItem, removes the no >longer references 'params' parameter and drops the corresponding index >test. >--- > C4/Circulation.pm | 13 ++-------- > t/db_dependent/Koha/SearchEngine/Indexer.t | 29 ---------------------- > 2 files changed, 2 insertions(+), 40 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 2295d40d23..3ec9a29075 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3815,21 +3815,12 @@ sub ReturnLostItem{ > > =head2 LostItem > >- LostItem( $itemnumber, $mark_lost_from, $force_mark_returned, [$params] ); >- >-The final optional parameter, C<$params>, expected to contain >-'skip_record_index' key, which relayed down to Koha::Item/store, >-there it prevents calling of ModZebra index_records, >-which takes most of the time in batch adds/deletes: index_records better >-to be called later in C<additem.pl> after the whole loop. >- >-$params: >- skip_record_index => 1|0 >+ LostItem( $itemnumber, $mark_lost_from, $force_mark_returned ); > > =cut > > sub LostItem{ >- my ($itemnumber, $mark_lost_from, $force_mark_returned, $params) = @_; >+ my ($itemnumber, $mark_lost_from, $force_mark_returned) = @_; > > unless ( $mark_lost_from ) { > # Temporary check to avoid regressions >diff --git a/t/db_dependent/Koha/SearchEngine/Indexer.t b/t/db_dependent/Koha/SearchEngine/Indexer.t >index 3d8454c234..b1731bc7b3 100755 >--- a/t/db_dependent/Koha/SearchEngine/Indexer.t >+++ b/t/db_dependent/Koha/SearchEngine/Indexer.t >@@ -159,35 +159,6 @@ subtest 'Test indexer calls' => sub { > AddReturn($item->barcode, $item->homebranch, 0, undef); > } [$engine,'C4::Circulation'], "index_records is called once for $engine when calling AddReturn if item not issued"; > >- $builder->build( >- { >- source => 'Branchtransfer', >- value => { >- itemnumber => $item->itemnumber, >- datesent => dt_from_string, >- datearrived => undef, >- datecancelled => undef >- } >- } >- ); >- warnings_are{ >- LostItem( $item->itemnumber, "tests"); >- } [$engine,"Koha::Item"], "index_records is called for $engine when calling LostItem and transfer exists"; >- $builder->build( >- { >- source => 'Branchtransfer', >- value => { >- itemnumber => $item2->itemnumber, >- datesent => dt_from_string, >- datearrived => undef, >- datecancelled => undef >- } >- } >- ); >- warnings_are{ >- LostItem( $item->itemnumber, "tests", undef, { skip_record_index => 1 }); >- } undef, "index_records is not called for $engine when calling LostItem and transfer exists if skip_record_index"; >- > $item->datelastseen('2020-02-02'); > $item->store({skip_record_index=>1}); > warnings_are{ >-- >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 27281
:
117921
|
117922
|
117924
|
117925
|
117926
|
119754
|
119755
|
119756
|
119757
|
119847
|
119848
|
119849
|
119850
|
119986
|
120105
|
120107
|
120117