Bugzilla – Attachment 151978 Details for
Bug 33493
Add a filter relationship for branchtransfers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33493: (QA follow-up) Only bless the first transfer
Bug-33493-QA-follow-up-Only-bless-the-first-transf.patch (text/plain), 2.42 KB, created by
Marcel de Rooy
on 2023-06-02 09:13:21 UTC
(
hide
)
Description:
Bug 33493: (QA follow-up) Only bless the first transfer
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-06-02 09:13:21 UTC
Size:
2.42 KB
patch
obsolete
>From 6c295f7ef1ea38b6b866f3d5047cdd5d2cdb284a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 2 Jun 2023 09:10:01 +0000 >Subject: [PATCH] Bug 33493: (QA follow-up) Only bless the first transfer >Content-Type: text/plain; charset=utf-8 > >No need to do a walk through on all the results. >Correcting two test descriptions on the way. > >Test plan: >Run t/db_dependent/Koha/Item.t >Run t/db_dependent/Koha/Items.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Item.pm | 5 ++--- > t/db_dependent/Koha/Item.t | 2 +- > t/db_dependent/Koha/Items.t | 2 +- > 3 files changed, 4 insertions(+), 5 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 7f5362dc68..04428facdd 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -565,9 +565,8 @@ we still expect the item to end up at a final location eventually. > sub get_transfer { > my ($self) = @_; > >- my $transfer = $self->_result->current_branchtransfers; >- >- return Koha::Item::Transfers->_new_from_dbic($transfer)->next; >+ my $transfer = $self->_result->current_branchtransfers->next; >+ return Koha::Item::Transfer->_new_from_dbic($transfer) if $transfer; > } > > =head3 get_transfers >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index c5fd5fec1a..000a7dc7f4 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -2189,7 +2189,7 @@ subtest 'current_branchtransfers relationship' => sub { > ); > my $transfers = $item->_result->current_branchtransfers; > is( ref($transfers), 'DBIx::Class::ResultSet', >- 'current_branchtransfers returns a Koha::Item::Transfers object set' ); >+ 'current_branchtransfers returns a DBIx::Class::ResultSet' ); > is( $transfers->count, 0, > "Empty Koha::Item::Transfers set returned if no return_claims" ); > my $transfer1 = $builder->build( >diff --git a/t/db_dependent/Koha/Items.t b/t/db_dependent/Koha/Items.t >index 5676a56596..407425e687 100755 >--- a/t/db_dependent/Koha/Items.t >+++ b/t/db_dependent/Koha/Items.t >@@ -1390,7 +1390,7 @@ subtest 'get_transfer' => sub { > ); > > $transfer = $new_item_1->get_transfer(); >- is( ref($transfer), 'Koha::Item::Transfer', 'Koha::Item->get_transfer should return a Koha::Item::Transfers object' ); >+ is( ref($transfer), 'Koha::Item::Transfer', 'Koha::Item->get_transfer should return a Koha::Item::Transfer object' ); > > my $transfer_2 = $builder->build_object( > { >-- >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 33493
:
149464
|
149469
|
151865
|
151923
|
151924
|
151976
|
151977
| 151978