Bugzilla – Attachment 181327 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.65 KB, created by
Lucas Gass (lukeg)
on 2025-04-22 22:27:29 UTC
(
hide
)
Description:
Bug 23010: Update pref name to PreventWithdrawingItemsStatus
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-04-22 22:27:29 UTC
Size:
3.65 KB
patch
obsolete
>From 9a58291a70feffeac19c03cf40f4a8373b748fe6 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 > >--- > 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 833bb2cebe9..9b45ce15b18 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 ecfcb789c17..1fa805b3e73 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 ed48ce7dded..74924851aa3 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.39.5
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