Bugzilla – Attachment 144907 Details for
Bug 31095
Remove Koha::Patron::Debarment::GetDebarments and use $patron->restrictions in preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31095: Remove GetDebarments from members/moremember.pl
Bug-31095-Remove-GetDebarments-from-membersmoremem.patch (text/plain), 3.71 KB, created by
Jonathan Druart
on 2023-01-02 14:58:27 UTC
(
hide
)
Description:
Bug 31095: Remove GetDebarments from members/moremember.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-01-02 14:58:27 UTC
Size:
3.71 KB
patch
obsolete
>From a7387ac704d510fe177a95a9c9fe591cd71fe3db Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 24 Aug 2022 16:13:26 +0100 >Subject: [PATCH] Bug 31095: Remove GetDebarments from members/moremember.pl > >This patch removes the use of GetDebarments from members/moremember.pl >and replaces template references with patrons.restrictions and the new >includes introduced in the prior patch > >Test plan >1. Confirm that the 'Restrictions (x)' tab still appears on the patron > details page. >2. Confirm that the 'Restrictions (x)' tab count is correct >3. Confirm that the 'Restrictions (x)' tab table functions >4. Confirm that the 'Restrictions (x)' tab 'Add manual restriction' form > works as expected > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../intranet-tmpl/prog/en/modules/members/moremember.tt | 4 ++-- > members/moremember.pl | 5 +---- > 2 files changed, 3 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index ef0a906c908..e37050d1afe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -713,7 +713,7 @@ > [% END %] > > <li role="presentation"> >- <a id="debarments-tab-link" href="#reldebarments" aria-controls="reldebarments" role="tab" data-toggle="tab">Restrictions ([% debarments.size || 0 | html %])</a> >+ <a id="debarments-tab-link" href="#reldebarments" aria-controls="reldebarments" role="tab" data-toggle="tab">Restrictions ([% patron.restrictions.count | html %])</a> > </li> > > [% SET enrollments = patron.get_club_enrollments %] >@@ -748,7 +748,7 @@ > </div> > [% END %] > >- [% INCLUDE borrower_debarments.inc %] >+ [% INCLUDE 'patron-restrictions-tab.inc' %] > > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] > <div id="reserves" role="tabpanel" class="tab-pane"> >diff --git a/members/moremember.pl b/members/moremember.pl >index 0523d02831a..767b1a783b7 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -36,7 +36,6 @@ use C4::Form::MessagingPreferences; > use List::MoreUtils qw( uniq ); > use Scalar::Util qw( looks_like_number ); > use Koha::Patron::Attribute::Types; >-use Koha::Patron::Debarments qw( GetDebarments ); > use Koha::Patron::Restriction::Types; > use Koha::Patron::Messages; > use Koha::CsvProfiles; >@@ -81,12 +80,11 @@ for (qw(gonenoaddress lost borrowernotes is_debarred)) { > } > > $template->param( >- restriction_types => scalar Koha::Patron::Restriction::Types->keyed_on_code() >+ restriction_types => scalar Koha::Patron::Restriction::Types->search() > ); > > if ( $patron->is_debarred ) { > $template->param( >- 'debarments' => scalar GetDebarments({ borrowernumber => $borrowernumber }), > 'userdebarred' => $patron->debarred, > 'debarredcomment' => $patron->debarredcomment, > ); >@@ -281,7 +279,6 @@ $template->param( > relatives_borrowernumbers => \@relatives, > logged_in_user => $logged_in_user, > files => Koha::Patron::Files->new( borrowernumber => $borrowernumber ) ->GetFilesInfo(), >- #debarments => scalar GetDebarments({ borrowernumber => $borrowernumber }), > has_modifications => $has_modifications, > ); > >-- >2.25.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 31095
:
139614
|
139719
|
139720
|
139721
|
139722
|
139723
|
139724
|
139725
|
139726
|
139727
|
139728
|
139742
|
139743
|
139744
|
139745
|
139746
|
139747
|
139748
|
139749
|
139750
|
139751
|
139752
|
139753
|
139754
|
139755
|
139756
|
139757
|
139758
|
140714
|
140715
|
140716
|
140717
|
140718
|
140719
|
140720
|
140721
|
140722
|
140723
|
140724
|
140725
|
140726
|
140727
|
140728
|
140729
|
140730
|
140731
|
142059
|
142060
|
142061
|
142062
|
142063
|
142064
|
142065
|
142066
|
142067
|
142068
|
142069
|
142070
|
142071
|
142072
|
142073
|
142074
|
142075
|
142076
|
143745
|
143746
|
143747
|
143748
|
143749
|
143750
|
143751
|
143752
|
143753
|
143754
|
143755
|
143756
|
143757
|
143758
|
143759
|
143760
|
143761
|
143762
|
143763
|
144903
|
144904
|
144905
|
144906
| 144907 |
144908
|
144909
|
144910
|
144911
|
144912
|
144913
|
144914
|
144915
|
144916
|
144917
|
144918
|
144919
|
144920
|
144921
|
145800
|
145801
|
145803
|
145845