Bugzilla – Attachment 60777 Details for
Bug 16735
Replace existing library search groups functionality with the new hierarchical groups system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16735 - Remove use of get_categories
Bug-16735---Remove-use-of-getcategories.patch (text/plain), 4.97 KB, created by
Kyle M Hall (khall)
on 2017-03-01 14:08:52 UTC
(
hide
)
Description:
Bug 16735 - Remove use of get_categories
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-03-01 14:08:52 UTC
Size:
4.97 KB
patch
obsolete
>From ab179dd3bbc9815d50410425997a9b0cb37dc9c0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 21 Feb 2017 12:26:25 +0000 >Subject: [PATCH] Bug 16735 - Remove use of get_categories > >Feature using it is completely undocumented as far as my research has >shown. >--- > C4/Circulation.pm | 29 ----------------------------- > C4/SIP/ILS/Transaction/Checkin.pm | 2 +- > circ/branchtransfers.pl | 4 ---- > circ/returns.pl | 7 ------- > 4 files changed, 1 insertion(+), 41 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e2cd626..c25d26d 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -277,10 +277,6 @@ is a reference-to-hash which may have any of the following keys: > > There is no item in the catalog with the given barcode. The value is C<$barcode>. > >-=item C<IsPermanent> >- >-The item's home branch is permanent. This doesn't prevent the item from being transferred, though. The value is the code of the item's home branch. >- > =item C<DestinationEqualsHolding> > > The item is already at the branch to which it is being transferred. The transfer is nonetheless considered to have failed. The value should be ignored. >@@ -334,15 +330,6 @@ sub transferbook { > } > } > >- # if is permanent... >- # FIXME Is this still used by someone? >- # See other FIXME in AddReturn >- my $library = Koha::Libraries->find($hbr); >- if ( $library and $library->get_categories->search({'me.categorycode' => 'PE'})->count ) { >- $messages->{'IsPermanent'} = $hbr; >- $dotransfer = 0; >- } >- > # can't transfer book if is already there.... > if ( $fbr eq $tbr ) { > $messages->{'DestinationEqualsHolding'} = 1; >@@ -1770,12 +1757,6 @@ No item with this barcode exists. The value is C<$barcode>. > > The book is not currently on loan. The value is C<$barcode>. > >-=item C<IsPermanent> >- >-The book's home branch is a permanent collection. If you have borrowed >-this book, you are not allowed to return it. The value is the code for >-the book's home branch. >- > =item C<withdrawn> > > This book has been withdrawn/cancelled. The value should be ignored. >@@ -1893,16 +1874,6 @@ sub AddReturn { > } > } > >- >- # check if the book is in a permanent collection.... >- # FIXME -- This 'PE' attribute is largely undocumented. afaict, there's no user interface that reflects this functionality. >- if ( $returnbranch ) { >- my $library = Koha::Libraries->find($returnbranch); >- if ( $library and $library->get_categories->search({'me.categorycode' => 'PE'})->count ) { >- $messages->{'IsPermanent'} = $returnbranch; >- } >- } >- > # check if the return is allowed at this branch > my ($returnallowed, $message) = CanBookBeReturned($item, $branch); > unless ($returnallowed){ >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index bc1c433..c315720 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -67,7 +67,7 @@ sub do_checkin { > $debug and warn "do_checkin() calling AddReturn($barcode, $branch)"; > my ($return, $messages, $iteminformation, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date); > $self->alert(!$return); >- # ignoring messages: NotIssued, IsPermanent, WasLost, WasTransfered >+ # ignoring messages: NotIssued, WasLost, WasTransfered > > # biblionumber, biblioitemnumber, itemnumber > # borrowernumber, reservedate, branchcode >diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl >index 864db53..b32fca9 100755 >--- a/circ/branchtransfers.pl >+++ b/circ/branchtransfers.pl >@@ -200,10 +200,6 @@ foreach my $code ( keys %$messages ) { > $err{tbr} = $tbr; > $err{code} = $typecode; > } >- elsif ( $code eq 'IsPermanent' ) { >- $err{errispermanent} = 1; >- $err{msg} = $messages->{'IsPermanent'}; >- } > elsif ( $code eq 'WasReturned' ) { > $err{errwasreturned} = 1; > $err{borrowernumber} = $messages->{'WasReturned'}; >diff --git a/circ/returns.pl b/circ/returns.pl >index 5382e19..4d5f516 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -485,7 +485,6 @@ foreach my $code ( keys %$messages ) { > elsif ( $code eq 'NotIssued' ) { > $err{notissued} = 1; > $err{msg} = ''; >- $err{msg} = $messages->{'IsPermanent'} if $messages->{'IsPermanent'}; > } > elsif ( $code eq 'LocalUse' ) { > $err{localuse} = 1; >@@ -509,12 +508,6 @@ foreach my $code ( keys %$messages ) { > $err{withdrawn} = 1; > $exit_required_p = 1 if C4::Context->preference("BlockReturnOfWithdrawnItems"); > } >- elsif ( ( $code eq 'IsPermanent' ) && ( not $messages->{'ResFound'} ) ) { >- if ( $messages->{'IsPermanent'} ne $userenv_branch ) { >- $err{ispermanent} = 1; >- $err{msg} = $messages->{'IsPermanent'}; >- } >- } > elsif ( $code eq 'WrongTransfer' ) { > ; # FIXME... anything to do here? > } >-- >2.1.4
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 16735
:
52732
|
52733
|
52734
|
52735
|
57098
|
57099
|
57100
|
57101
|
58087
|
58088
|
58089
|
58090
|
60497
|
60498
|
60499
|
60500
|
60501
|
60502
|
60503
|
60772
|
60773
|
60774
|
60775
|
60776
|
60777
|
60778
|
60779
|
65658
|
65659
|
65660
|
65661
|
65662
|
65663
|
65664
|
65665
|
69533
|
69534
|
69535
|
69536
|
69537
|
69538
|
69539
|
69540
|
69541
|
69684
|
69685
|
69686
|
69687
|
69688
|
69689
|
69690
|
69691
|
69692
|
69693
|
69694
|
71386
|
71393