Bugzilla – Attachment 108081 Details for
Bug 25348
Add support for circulation status 12 ( lost )
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25348: Add support for circulation status 12 ( lost )
Bug-25348-Add-support-for-circulation-status-12--l.patch (text/plain), 2.00 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-08-11 15:38:30 UTC
(
hide
)
Description:
Bug 25348: Add support for circulation status 12 ( lost )
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-08-11 15:38:30 UTC
Size:
2.00 KB
patch
obsolete
>From 51bbfc06a200a7922f11039d3faabbeb0dfa4cae Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 1 May 2020 12:24:44 -0400 >Subject: [PATCH] Bug 25348: Add support for circulation status 12 ( lost ) > >We should support the SIP2 "circulation status" value 12, "lost". > >Test Plan: >1) Apply this patch >2) prove t/db_dependent/SIP/Transaction.t > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/SIP/ILS/Item.pm | 3 +++ > t/db_dependent/SIP/Transaction.t | 7 ++++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm >index 0950864aa2..056c214be4 100644 >--- a/C4/SIP/ILS/Item.pm >+++ b/C4/SIP/ILS/Item.pm >@@ -265,6 +265,9 @@ sub sip_circulation_status { > elsif ( Koha::Checkouts::ReturnClaims->search({ itemnumber => $self->{_object}->id, resolution => undef })->count ) { > return '11'; # claimed returned > } >+ elsif ( $self->{itemlost} ) { >+ return '12'; # lost >+ } > elsif ( $self->{borrowernumber} ) { > return '04'; # charged > } >diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t >index 770bcc1a14..a11b6b48db 100755 >--- a/t/db_dependent/SIP/Transaction.t >+++ b/t/db_dependent/SIP/Transaction.t >@@ -399,7 +399,7 @@ subtest checkin_withdrawn => sub { > }; > > subtest item_circulation_status => sub { >- plan tests => 3; >+ plan tests => 4; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $library2 = $builder->build_object( { class => 'Koha::Libraries' } ); >@@ -450,5 +450,10 @@ subtest item_circulation_status => sub { > is( $status, '11', "Item circulation status is claimed returned" ); > > $claim->delete; >+ >+ $item->itemlost(1)->store(); >+ $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); >+ $status = $sip_item->sip_circulation_status; >+ is( $status, '12', "Item circulation status is lost" ); > }; > $schema->storage->txn_rollback; >-- >2.28.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 25348
:
104125
|
104174
|
108077
| 108081 |
108082