Bugzilla – Attachment 191678 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: Fix SIP Message tests for magnetic media
251d7fe.patch (text/plain), 3.29 KB, created by
Martin Renvoize (ashimema)
on 2026-01-20 12:28:13 UTC
(
hide
)
Description:
Bug 41649: Fix SIP Message tests for magnetic media
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-01-20 12:28:13 UTC
Size:
3.29 KB
patch
obsolete
>From 251d7fe0d449e3b87e8b328001b00bbc4875eb98 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Mon, 19 Jan 2026 14:26:14 +0000 >Subject: [PATCH] Bug 41649: Fix SIP Message tests for magnetic media > >The tests for desensitize and alert flags were failing because >items were created with random itemtypes that could have >sip_magnetic=1. This caused unexpected behavior since magnetic >media items don't get desensitized and trigger alert flags. > >Fix by explicitly creating itemtypes with sip_magnetic=0 in: >- test_checkout_desensitize >- test_renew_desensitize >- test_checkin_v2 >--- > t/db_dependent/SIP/Message.t | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > >diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t >index 71406dbf363..5e5a252040c 100755 >--- a/t/db_dependent/SIP/Message.t >+++ b/t/db_dependent/SIP/Message.t >@@ -1369,6 +1369,14 @@ sub test_checkin_v2 { > my $card1 = $patron1->{cardnumber}; > my $sip_patron1 = C4::SIP::ILS::Patron->new($card1); > $findpatron = $sip_patron1; >+ >+ # Create itemtype with sip_magnetic = 0 to ensure alert flag tests work correctly >+ my $itemtype_obj = $builder->build_object( >+ { >+ class => 'Koha::ItemTypes', >+ value => { sip_magnetic => 0 }, >+ } >+ ); > my $item_object = $builder->build_sample_item( > { > damaged => 0, >@@ -1377,6 +1385,7 @@ sub test_checkin_v2 { > restricted => 0, > homebranch => $branchcode, > holdingbranch => $branchcode, >+ itype => $itemtype_obj->itemtype, > } > ); > >@@ -1663,6 +1672,14 @@ sub test_checkout_desensitize { > my $sip_patron1 = C4::SIP::ILS::Patron->new($card1); > my $patron_category = $sip_patron1->ptype(); > $findpatron = $sip_patron1; >+ >+ # Create itemtype with sip_magnetic = 0 to ensure desensitize tests work correctly >+ my $itemtype_obj = $builder->build_object( >+ { >+ class => 'Koha::ItemTypes', >+ value => { sip_magnetic => 0 }, >+ } >+ ); > my $item_object = $builder->build_sample_item( > { > damaged => 0, >@@ -1671,6 +1688,7 @@ sub test_checkout_desensitize { > restricted => 0, > homebranch => $branchcode, > holdingbranch => $branchcode, >+ itype => $itemtype_obj->itemtype, > } > ); > my $itemtype = $item_object->effective_itemtype; >@@ -1857,6 +1875,14 @@ sub test_renew_desensitize { > my $sip_patron1 = C4::SIP::ILS::Patron->new($card1); > my $patron_category = $sip_patron1->ptype(); > $findpatron = $sip_patron1; >+ >+ # Create itemtype with sip_magnetic = 0 to ensure desensitize tests work correctly >+ my $itemtype_obj = $builder->build_object( >+ { >+ class => 'Koha::ItemTypes', >+ value => { sip_magnetic => 0 }, >+ } >+ ); > my $item_object = $builder->build_sample_item( > { > damaged => 0, >@@ -1865,6 +1891,7 @@ sub test_renew_desensitize { > restricted => 0, > homebranch => $branchcode, > holdingbranch => $branchcode, >+ itype => $itemtype_obj->itemtype, > } > ); > my $itemtype = $item_object->effective_itemtype; >-- >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
|
191673
|
191674
|
191675
|
191676
|
191677
|
191678
|
191679
|
191680
|
191681
|
191682
|
191683
|
191684
|
191685
|
191686