Bugzilla – Attachment 120107 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), 4.14 KB, created by
Martin Renvoize (ashimema)
on 2021-04-23 13:58:03 UTC
(
hide
)
Description:
Bug 27281: (QA follow-up) Fix Indexer Test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-23 13:58:03 UTC
Size:
4.14 KB
patch
obsolete
>From 9eb838d4c16f4be811582dcc2e1069e156091784 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. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Circulation.pm | 13 ++------- > t/db_dependent/Koha/SearchEngine/Indexer.t | 31 +--------------------- > 2 files changed, 3 insertions(+), 41 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..9c4f993638 100755 >--- a/t/db_dependent/Koha/SearchEngine/Indexer.t >+++ b/t/db_dependent/Koha/SearchEngine/Indexer.t >@@ -61,7 +61,7 @@ subtest 'Test indexer object creation' => sub { > }; > > subtest 'Test indexer calls' => sub { >- plan tests => 40; >+ plan tests => 36; > > my @engines = ('Zebra'); > eval { Koha::SearchEngine::Elasticsearch->get_elasticsearch_params; }; >@@ -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