Bugzilla – Attachment 102083 Details for
Bug 25008
Koha::RecordProcessor->options doesn't refresh the filters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25008: Overload Koha::RecordProcessor->options to update filters
Bug-25008-Overload-KohaRecordProcessor-options-to-.patch (text/plain), 1.35 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-03-30 13:31:10 UTC
(
hide
)
Description:
Bug 25008: Overload Koha::RecordProcessor->options to update filters
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-03-30 13:31:10 UTC
Size:
1.35 KB
patch
obsolete
>From 4e5bcfbda5ac2e9b3345d37d9658d026a9a3c2b9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 30 Mar 2020 10:06:43 -0300 >Subject: [PATCH] Bug 25008: Overload Koha::RecordProcessor->options to update > filters > >This patch overloads the 'options' accessor generated by Class:Accessor. >It does so the passed options are used to refresh the loaded filters. > >Tests are added for this overloaded method as well. > >To test: >1. Apply this patches >2. Run: > $ kshell > k$ prove t/RecordProcessor.t >=> SUCCESS: Tests pass! >3. Sign off :-D >--- > Koha/RecordProcessor.pm | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > >diff --git a/Koha/RecordProcessor.pm b/Koha/RecordProcessor.pm >index 1f93571d7b..a501c5010a 100644 >--- a/Koha/RecordProcessor.pm >+++ b/Koha/RecordProcessor.pm >@@ -121,6 +121,29 @@ sub new { > return $self; > } > >+=head3 options >+ >+ $processor->options( $new_options ); >+ >+Overloaded accessor, that spreads the new options to the filter objects when set >+ >+=cut >+ >+sub options { >+ my ( $self, $options ) = @_; >+ >+ if ( $options ) { # Set >+ foreach my $filter ( @{$self->filters} ) { >+ $filter->params->{options} = $options; >+ } >+ >+ $self->{options} = $options; >+ return $self; >+ } >+ >+ return $self->{options}; >+} >+ > =head2 bind > > $normalizer->bind($record) >-- >2.26.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 25008
:
102019
|
102082
|
102083
|
102086
|
102087
|
102088
|
102806
|
102807
|
102808