Bugzilla – Attachment 166855 Details for
Bug 34838
The ILL module and tests generate warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34838: Use ->set to avoid method redefinition warnings
Bug-34838-Use--set-to-avoid-method-redefinition-wa.patch (text/plain), 3.56 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-05-16 20:35:41 UTC
(
hide
)
Description:
Bug 34838: Use ->set to avoid method redefinition warnings
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-05-16 20:35:41 UTC
Size:
3.56 KB
patch
obsolete
>From b77a62962aad9684fbe56e4e637ad891ad49e1f6 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 16 May 2024 17:13:05 -0300 >Subject: [PATCH] Bug 34838: Use ->set to avoid method redefinition warnings > >This patch silences more warnings. To test > >1. Be on 23.11.x >2. Apply the patches before this one >3. Run: > $ ktd --shell > k$ prove t/db_dependent/Illrequests.t >=> FAIL: Lots of warnings like this: >Subroutine Koha::Illrequest::SUPER::status redefined at /kohadevbox/koha/Koha/Object.pm line 955. >Subroutine Koha::Illrequest::SUPER::status_alias redefined at /kohadevbox/koha/Koha/Object.pm line 955. >illrequestattributes is DEPRECATED in favor of extended_attributes at t/db_dependent/Illrequests.t line 1071. >4. Apply this patch >5. Repeat 3 >=> SUCCESS: No more warnings! >6. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/ILL/Request.pm | 8 ++++---- > .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm >index cc9f59bdff7..beb185e078c 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -184,7 +184,7 @@ sub statusalias { > return Koha::AuthorisedValues->search( > { > category => 'ILL_STATUS_ALIAS', >- authorised_value => $self->SUPER::status_alias >+ authorised_value => $self->get_column('status_alias'), > }, > {}, > $self->branchcode >@@ -315,7 +315,7 @@ sub status_alias { > # We need a way of accepting implied undef, so we can nullify > # the status_alias column, when called from $self->status > my $val = $new_status_alias eq "-1" ? undef : $new_status_alias; >- my $ret = $self->SUPER::status_alias($val); >+ my $ret = $self->set( { status_alias => $val } ); > my $val_to_log = $val ? $new_status_alias : scalar $self->status; > if ($ret) { > my $logger = Koha::ILL::Request::Logger->new; >@@ -369,7 +369,7 @@ sub status { > $self->{previous_status} = $current_status_alias ? > $current_status_alias : > $current_status; >- my $ret = $self->SUPER::status($new_status)->store; >+ my $ret = $self->set( { status => $new_status } )->store; > if ($current_status_alias) { > # This is hackery to enable us to undefine > # status_alias, since we need to have an overloaded >@@ -1174,7 +1174,7 @@ sub get_type { > my $attr = $self->extended_attributes->find({ type => 'type'}); > return if !$attr; > return $attr->value; >-}; >+} > > =head3 get_type_disclaimer_value > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 49ee2e82673..d9f4d579ada 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -764,7 +764,7 @@ > </div> > <div class="modal-body"> > <div id="requestattributes"> >- [% FOREACH attr IN request.illrequestattributes %] >+ [% FOREACH attr IN request.extended_attributes %] > <div class="requestattr-[% attr.type | html %]"> > <span class="label">[% attr.type | html %]:</span> > [% attr.value | html %] >-- >2.45.0
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 34838
:
156178
|
156200
|
156201
|
156202
|
156204
|
156217
|
156218
|
156219
|
156220
|
166841
|
166842
|
166843
|
166844
|
166845
|
166846
|
166847
|
166848
|
166849
|
166850
|
166851
|
166852
|
166853
|
166854
|
166855
|
167193
|
167194
|
167211
|
167212
|
167213
|
167214
|
167215
|
167216