Bugzilla – Attachment 191552 Details for
Bug 41649
Add support for setting the magnetic media flag for SIP in Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41649: Set magnetic_media in SIP responses
9f80076.patch (text/plain), 1.81 KB, created by
Martin Renvoize (ashimema)
on 2026-01-16 08:17:23 UTC
(
hide
)
Description:
Bug 41649: Set magnetic_media in SIP responses
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-01-16 08:17:23 UTC
Size:
1.81 KB
patch
obsolete
>From 9f8007603efac10c7c01019d321eb1a6197695d5 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@openfifth.co.uk> >Date: Tue, 7 Dec 2021 09:41:01 +0000 >Subject: [PATCH] Bug 41649: Set magnetic_media in SIP responses > >The `magnetic_media` flag was never set, it can be set from >`sip_media_type` if it's present. `sip_media_type` is set via the >Authorized Values system. > >Checkins will not be sorted correctly by Biblioteca without this flag. >--- > C4/SIP/ILS/Item.pm | 7 ++++++- > C4/SIP/Sip/MsgType.pm | 2 +- > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm >index 4aadb99f22d..36d505c3969 100644 >--- a/C4/SIP/ILS/Item.pm >+++ b/C4/SIP/ILS/Item.pm >@@ -106,7 +106,12 @@ sub new { > my $it = $item->effective_itemtype; > $self->{itemtype} = $it; > my $itemtype = Koha::Database->new()->schema()->resultset('Itemtype')->find($it); >- $self->{sip_media_type} = $itemtype->sip_media_type() if $itemtype; >+ if ($itemtype) { >+ $self->{sip_media_type} = $itemtype->sip_media_type; >+ if ( defined( $self->{sip_media_type} ) && $self->{sip_media_type} =~ m/^(00[4578]|010)/ ) { >+ $self->{magnetic_media} = 1; >+ } >+ } > > # check if its on issue and if so get the borrower > my $issue = Koha::Checkouts->find( { itemnumber => $item->itemnumber } ); >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 37cb7d1a7e8..38e6d7cb156 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -752,7 +752,7 @@ sub handle_checkin { > $resp .= 'U'; > } > >- $resp .= $status->alert ? 'Y' : 'N'; >+ $resp .= ( $status->alert || $item->magnetic_media ) ? 'Y' : 'N'; > $resp .= timestamp; > $resp .= add_field( FID_INST_ID, $inst_id, $server ); > $resp .= add_field( FID_ITEM_ID, $item_id, $server ); >-- >2.52.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 41649
: 191552 |
191553
|
191554
|
191555
|
191556