Bugzilla – Attachment 169365 Details for
Bug 28762
Item status shows incorrectly on course-details.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28762: Replace is_notforloan with not_for_loan
Bug-28762-Replace-isnotforloan-with-notforloan.patch (text/plain), 2.70 KB, created by
Nick Clemens (kidclamp)
on 2024-07-22 19:10:53 UTC
(
hide
)
Description:
Bug 28762: Replace is_notforloan with not_for_loan
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-07-22 19:10:53 UTC
Size:
2.70 KB
patch
obsolete
>From 1287fc6423151b9662fa527700304f33651fbf6b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 22 Jul 2024 16:14:08 +0100 >Subject: [PATCH] Bug 28762: Replace is_notforloan with not_for_loan > >This patch replaces the use of is_notforloan with not_for_loan and >removes the older is_notforloan method and tests > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/ILSDI/Services.pm | 2 +- > Koha/Item.pm | 14 -------------- > t/db_dependent/Koha/Item.t | 19 ------------------- > 3 files changed, 1 insertion(+), 34 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 7d40c6b4d14..5a214562b3c 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -970,7 +970,7 @@ sub _availability { > my $location = $library ? $library->branchname : ''; > my $itemcallnumber = $item->itemcallnumber; > >- if ( $item->is_notforloan ) { >+ if ( $item->effective_notforloan ) { > return ( $biblionumber, __('not available'), __('Not for loan'), $location, $itemcallnumber ); > } elsif ( $item->onloan ) { > return ( $biblionumber, __('not available'), __('Checked out'), $location, $itemcallnumber ); >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 33ee8e02263..ed573d1b6a9 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -2398,20 +2398,6 @@ sub check_recalls { > return $recall; > } > >-=head3 is_notforloan >- >- my $is_notforloan = $item->is_notforloan; >- >-Determine whether or not this item is "notforloan" based on >-the item's notforloan status or its item type >- >-=cut >- >-sub is_notforloan { >- my ( $self ) = @_; >- return $self->not_for_loan; >-} >- > =head3 is_denied_renewal > > my $is_denied_renewal = $item->is_denied_renewal; >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 1597d0d4bda..f92a4095d6e 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -2242,25 +2242,6 @@ subtest 'Recalls tests' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'Notforloan tests' => sub { >- >- plan tests => 3; >- >- $schema->storage->txn_begin; >- >- my $item1 = $builder->build_sample_item; >- $item1->update({ notforloan => 0 }); >- $item1->itemtype->notforloan(0); >- ok( !$item1->is_notforloan, 'Notforloan is correctly false by item status and item type'); >- $item1->update({ notforloan => 1 }); >- ok( $item1->is_notforloan, 'Notforloan is correctly true by item status'); >- $item1->update({ notforloan => 0 }); >- $item1->itemtype->update({ notforloan => 1 }); >- ok( $item1->is_notforloan, 'Notforloan is correctly true by item type'); >- >- $schema->storage->txn_rollback; >-}; >- > subtest 'item_group() tests' => sub { > > plan tests => 4; >-- >2.39.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 28762
:
123233
|
123234
|
123236
|
123237
|
124661
|
124666
|
124667
|
124668
|
124744
|
125220
|
125228
|
125229
|
125233
|
161563
|
161564
|
161565
|
161566
|
161567
|
161568
|
161569
|
161570
|
161571
|
161572
|
161573
|
161574
|
161584
|
161585
|
161586
|
161587
|
161588
|
161589
|
161590
|
161591
|
163310
|
163311
|
163312
|
163313
|
163314
|
163315
|
163316
|
163317
|
165843
|
165844
|
165845
|
165846
|
165847
|
165848
|
165849
|
165850
|
169172
|
169273
|
169274
|
169275
|
169276
|
169277
|
169278
|
169279
|
169280
|
169281
|
169311
|
169312
|
169313
|
169314
|
169354
|
169355
|
169356
|
169357
|
169358
|
169359
|
169360
|
169361
|
169362
|
169363
|
169364
| 169365 |
169366
|
169367
|
169393