Bugzilla – Attachment 129550 Details for
Bug 29809
StockRotationItems->itemnumber is poorly named
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29809: (follow-up) Update tests and rename variable
Bug-29809-follow-up-Update-tests-and-rename-variab.patch (text/plain), 3.01 KB, created by
Nick Clemens (kidclamp)
on 2022-01-18 12:01:00 UTC
(
hide
)
Description:
Bug 29809: (follow-up) Update tests and rename variable
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-01-18 12:01:00 UTC
Size:
3.01 KB
patch
obsolete
>From 168e664f7ce648d516c4a6748f5d268166cbb77d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 18 Jan 2022 11:55:59 +0000 >Subject: [PATCH] Bug 29809: (follow-up) Update tests and rename variable > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/StockRotationItems.t | 10 +++++----- > tools/stockrotation.pl | 2 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/StockRotationItems.t b/t/db_dependent/StockRotationItems.t >index fe16023dd8..8c21a3675f 100755 >--- a/t/db_dependent/StockRotationItems.t >+++ b/t/db_dependent/StockRotationItems.t >@@ -267,7 +267,7 @@ subtest "Tests for needs_advancing." => sub { > )->store; > is($dbitem->needs_advancing, 1, "Ready to be advanced."); > $dbtransfer->delete; >- warning_is {$dbitem->needs_advancing} "We have no historical branch transfer for itemnumber " . $dbitem->item->itemnumber . "; This should not have happened!", "Missing transfer is warned."; >+ warning_is {$dbitem->needs_advancing} "We have no historical branch transfer for item " . $dbitem->item->itemnumber . "; This should not have happened!", "Missing transfer is warned."; > > $schema->storage->txn_rollback; > }; >@@ -469,13 +469,13 @@ subtest "Tests for advance." => sub { > class => 'Koha::Checkouts', > value => { > branchcode => $srstage_1->branchcode_id, >- itemnumber => $sritem_1->itemnumber->itemnumber, >+ itemnumber => $sritem_1->item->itemnumber, > returndate => undef > } > }); >- $sritem_1->itemnumber->holdingbranch($srstage_1->branchcode_id)->store; >+ $sritem_1->item->holdingbranch($srstage_1->branchcode_id)->store; > ok($sritem_1->advance, "Advancement done."); >- $transfer_request = $sritem_1->itemnumber->get_transfer; >+ $transfer_request = $sritem_1->item->get_transfer; > is($transfer_request->frombranch, $srstage_1->branchcode_id, "Origin correct."); > is($transfer_request->tobranch, $srstage_1->branchcode_id, "Target correct."); > is($transfer_request->datesent, undef, "Transfer waiting to initiate until return."); >@@ -484,7 +484,7 @@ subtest "Tests for advance." => sub { > $sritem_1->advance; #advance back to second stage > # Set arrived > $transfer_request->datearrived(dt_from_string())->store; >- $sritem_1->itemnumber->holdingbranch($srstage_2->branchcode_id)->store; >+ $sritem_1->item->holdingbranch($srstage_2->branchcode_id)->store; > > > $srstage_1->rota->cyclical(0)->store; # Set Rota to non-cyclical. >diff --git a/tools/stockrotation.pl b/tools/stockrotation.pl >index 4523c99174..04ff184da5 100755 >--- a/tools/stockrotation.pl >+++ b/tools/stockrotation.pl >@@ -252,7 +252,7 @@ if (!defined $op) { > > # Get all items on this rota, for each prefetch their > # stage and biblio objects >- my $items = Koha::StockRotationItems->search( >+ my $sritems = Koha::StockRotationItems->search( > { 'stage.rota_id' => $params{rota_id} }, > { > prefetch => { >-- >2.30.2
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 29809
:
129086
|
129087
|
129548
|
129549
|
129550
|
129901
|
129902
|
129903
|
129904