Bugzilla – Attachment 182217 Details for
Bug 23010
If an item is checked out or in transit it should not be able to be marked withdrawn
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23010: Update pref name to PreventWithdrawingItemsStatus
Bug-23010-Update-pref-name-to-PreventWithdrawingIt.patch (text/plain), 3.71 KB, created by
Emily Lamancusa (emlam)
on 2025-05-09 17:50:39 UTC
(
hide
)
Description:
Bug 23010: Update pref name to PreventWithdrawingItemsStatus
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2025-05-09 17:50:39 UTC
Size:
3.71 KB
patch
obsolete
>From 8c6de433534249b2053ecef9abbb3e2e1a473399 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 22 Apr 2025 22:24:23 +0000 >Subject: [PATCH] Bug 23010: Update pref name to PreventWithdrawingItemsStatus > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > Koha/Item.pm | 2 +- > .../bug_23010_add_PreventWithdrawingItemsStatus.pl | 6 +++--- > t/db_dependent/Koha/Item.t | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 65c1837f1f..14957972f0 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -188,7 +188,7 @@ sub store { > } > } > >- my $prevent_withdrawing_of = C4::Context->preference('PreventWithDrawingItemsStatus'); >+ my $prevent_withdrawing_of = C4::Context->preference('PreventWithdrawingItemsStatus'); > my @statuses_to_prevent = defined $prevent_withdrawing_of ? split( ',', $prevent_withdrawing_of ) : (); > my $prevent_onloan = grep { $_ eq 'checkedout' } @statuses_to_prevent; > my $prevent_intransit = grep { $_ eq 'intransit' } @statuses_to_prevent; >diff --git a/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl b/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl >index ecfcb789c1..1fa805b3e7 100755 >--- a/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl >+++ b/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl >@@ -3,7 +3,7 @@ use Koha::Installer::Output qw(say_warning say_success say_info); > > return { > bug_number => "23010", >- description => "Add new PreventWithDrawingItemsStatus system preference", >+ description => "Add new PreventWithdrawingItemsStatus system preference", > up => sub { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; >@@ -11,10 +11,10 @@ return { > $dbh->do( > q{ > INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) >- VALUES ('PreventWithDrawingItemsStatus',NULL,'','Prevent the withdrawing of items based on statuses','Choice') >+ VALUES ('PreventWithdrawingItemsStatus',NULL,'','Prevent the withdrawing of items based on statuses','Choice') > } > ); > >- say $out "Added new system preference 'PreventWithDrawingItemsStatus'"; >+ say $out "Added new system preference 'PreventWithdrawingItemsStatus'"; > }, > }; >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 593ed0b5a2..1b8eb48edb 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -46,11 +46,11 @@ use t::lib::Dates; > my $schema = Koha::Database->new->schema; > my $builder = t::lib::TestBuilder->new; > >-subtest 'store PreventWithDrawingItemsStatus' => sub { >+subtest 'store PreventWithdrawingItemsStatus' => sub { > plan tests => 2; > $schema->storage->txn_begin; > >- t::lib::Mocks::mock_preference( 'PreventWithDrawingItemsStatus', 'intransit,checkedout' ); >+ t::lib::Mocks::mock_preference( 'PreventWithdrawingItemsStatus', 'intransit,checkedout' ); > my $library_1 = $builder->build( { source => 'Branch' } ); > my $library_2 = $builder->build( { source => 'Branch' } ); > >@@ -93,7 +93,7 @@ subtest 'store PreventWithDrawingItemsStatus' => sub { > 'Koha::Exceptions::Item::Transfer::InTransit', > 'Exception thrown when trying to withdraw item in transit'; > >- t::lib::Mocks::mock_preference( 'PreventWithDrawingItemsStatus', '' ); >+ t::lib::Mocks::mock_preference( 'PreventWithdrawingItemsStatus', '' ); > > $schema->storage->txn_rollback; > }; >-- >2.34.1
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 23010
:
176241
|
177299
|
177402
|
177413
|
177434
|
177435
|
177436
|
177437
|
177451
|
177452
|
177453
|
177454
|
177911
|
177912
|
177913
|
177914
|
178808
|
181322
|
181323
|
181324
|
181325
|
181326
|
181327
|
181400
|
182124
|
182129
|
182130
|
182131
|
182201
|
182212
|
182213
|
182214
|
182215
|
182216
| 182217 |
182218
|
182219
|
182220
|
182221
|
182222
|
182223
|
182224