Bugzilla – Attachment 104173 Details for
Bug 25347
Add support for circulation status 11 ( claimed returned )
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25347: Add support for circulation status 11 ( claimed returned )
Bug-25347-Add-support-for-circulation-status-11--c.patch (text/plain), 2.84 KB, created by
David Nind
on 2020-05-02 02:47:05 UTC
(
hide
)
Description:
Bug 25347: Add support for circulation status 11 ( claimed returned )
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-05-02 02:47:05 UTC
Size:
2.84 KB
patch
obsolete
>From 80b68d7452a2300536aca247da04862af7e43052 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 1 May 2020 12:16:48 -0400 >Subject: [PATCH] Bug 25347: Add support for circulation status 11 ( claimed > returned ) > >Now that we have return claims in Koha, we should support the SIP2 >"circulation status" value 11, "claimed returned". > >Test Plan: >1) Apply this patch >2) prove t/db_dependent/SIP/Transaction.t > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/SIP/ILS/Item.pm | 16 ++++++++++------ > t/db_dependent/SIP/Transaction.t | 16 +++++++++++++++- > 2 files changed, 25 insertions(+), 7 deletions(-) > >diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm >index 13440ad702..7dd774413a 100644 >--- a/C4/SIP/ILS/Item.pm >+++ b/C4/SIP/ILS/Item.pm >@@ -15,20 +15,21 @@ use Template; > > use C4::SIP::ILS::Transaction; > >-use C4::Debug; >-use C4::Context; > use C4::Biblio; >-use C4::Items; > use C4::Circulation; >+use C4::Context; >+use C4::Debug; >+use C4::Items; > use C4::Members; > use C4::Reserves; >-use Koha::Database; > use Koha::Biblios; >+use Koha::Checkouts::ReturnClaims; > use Koha::Checkouts; >+use Koha::Database; > use Koha::DateUtils; >-use Koha::Patrons; >-use Koha::Items; > use Koha::Holds; >+use Koha::Items; >+use Koha::Patrons; > > =encoding UTF-8 > >@@ -258,6 +259,9 @@ sub sip_circulation_status { > if ( $self->{_object}->get_transfer ) { > return '10'; # in transit between libraries > } >+ elsif ( Koha::Checkouts::ReturnClaims->search({ itemnumber => $self->{_object}->id, resolution => undef })->count ) { >+ return '11'; # claimed returned >+ } > elsif ( $self->{patron} ) { > return '04'; # charged > } >diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t >index f56777400a..7dcc8499c6 100755 >--- a/t/db_dependent/SIP/Transaction.t >+++ b/t/db_dependent/SIP/Transaction.t >@@ -397,7 +397,7 @@ subtest checkin_withdrawn => sub { > }; > > subtest item_circulation_status => sub { >- plan tests => 2; >+ plan tests => 3; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $library2 = $builder->build_object( { class => 'Koha::Libraries' } ); >@@ -434,5 +434,19 @@ subtest item_circulation_status => sub { > $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); > $status = $sip_item->sip_circulation_status; > is( $status, '10', "Item circulation status is in transit" ); >+ >+ $transfer->delete; >+ >+ my $claim = Koha::Checkouts::ReturnClaim->new({ >+ itemnumber => $item->id, >+ borrowernumber => $patron->id, >+ created_by => $patron->id, >+ })->store(); >+ >+ $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); >+ $status = $sip_item->sip_circulation_status; >+ is( $status, '11', "Item circulation status is claimed returned" ); >+ >+ $claim->delete; > }; > $schema->storage->txn_rollback; >-- >2.11.0
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 25347
:
104126
|
104173
|
108078
|
108080