Bugzilla – Attachment 158768 Details for
Bug 34868
Add ability for SIP2 to distinguish missing item from other lost types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34868: Add ability for SIP2 to distinguish missing item from other lost types
Bug-34868-Add-ability-for-SIP2-to-distinguish-miss.patch (text/plain), 3.85 KB, created by
Katrin Fischer
on 2023-11-09 21:18:11 UTC
(
hide
)
Description:
Bug 34868: Add ability for SIP2 to distinguish missing item from other lost types
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-11-09 21:18:11 UTC
Size:
3.85 KB
patch
obsolete
>From 9fff8d719ab0db7ac3eca96fa20d011152a553d8 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 21 Sep 2023 11:44:49 -0400 >Subject: [PATCH] Bug 34868: Add ability for SIP2 to distinguish missing item > from other lost types > >The SIP circulation status specifies that a 12 means an item is lost, and 13 means an item is missing. In Koha, missing items are simply a type of lost item so we never send a 13. This is an important distinction for some SIP based inventory tools. It would be good to be able to specify when lost status means "missing" at the SIP login level. > >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: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/SIP/ILS/Item.pm | 7 +++++++ > C4/SIP/Sip/MsgType.pm | 2 +- > etc/SIPconfig.xml | 1 + > t/db_dependent/SIP/Transaction.t | 4 +++- > 4 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm >index c949d3056d..abd64fc216 100644 >--- a/C4/SIP/ILS/Item.pm >+++ b/C4/SIP/ILS/Item.pm >@@ -262,12 +262,19 @@ sub title_id { > > sub sip_circulation_status { > my $self = shift; >+ my $server = shift; >+ >+ my $missing_status = $server->{account}->{missing_lost_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 ( $missing_status && $self->{itemlost} && $missing_status eq $self->{itemlost} ) { >+ return '13'; # missing >+ } > elsif ( $self->{itemlost} ) { > return '12'; # lost > } >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 97ad633e31..d8c49cddcf 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -1244,7 +1244,7 @@ sub handle_item_information { > ModDateLastSeen( $item->itemnumber, $seen eq 'keep_lost' ) if $seen; > > # Valid Item ID, send the good stuff >- my $circulation_status = $item->sip_circulation_status; >+ my $circulation_status = $item->sip_circulation_status($server); > $resp .= $circulation_status; > $resp .= $item->sip_security_marker; > $resp .= $item->sip_fee_type; >diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml >index b2a32d49c5..594ea46fa7 100644 >--- a/etc/SIPconfig.xml >+++ b/etc/SIPconfig.xml >@@ -81,6 +81,7 @@ > format_due_date="0" > inhouse_item_types="" > inhouse_patron_categories="" >+ missing_lost_status="4" > blocked_item_types="VM|MU" > seen_on_item_information="mark_found"> <!-- could be "keep_lost", empty to disable --> > <!-- show_checkin_message: If enabled, successful checking responses will contain an AF screen message --> >diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t >index e4741d84fe..aa0a811ce2 100755 >--- a/t/db_dependent/SIP/Transaction.t >+++ b/t/db_dependent/SIP/Transaction.t >@@ -1126,7 +1126,7 @@ RULES > }; > > subtest item_circulation_status => sub { >- plan tests => 7; >+ plan tests => 8; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $library2 = $builder->build_object( { class => 'Koha::Libraries' } ); >@@ -1185,6 +1185,8 @@ subtest item_circulation_status => sub { > $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); > $status = $sip_item->sip_circulation_status; > is( $status, '12', "Item circulation status is lost" ); >+ $status = $sip_item->sip_circulation_status( { account => { missing_lost_status => "1" } } ); >+ is( $status, '13', "Item circulation status is missing" ); > $item->itemlost(0)->store(); > > my $location = $item->location; >-- >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 34868
:
156003
|
156027
|
158151
|
158614
|
158615
|
158616
|
158617
| 158768 |
158769
|
158770
|
158771