Bugzilla – Attachment 133194 Details for
Bug 30410
Add a way for plugins to register background tasks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30410: (QA follow-up) Pluralise new methods, fix minor issues with language
Bug-30410-QA-follow-up-Pluralise-new-methods-fix-m.patch (text/plain), 3.47 KB, created by
Kyle M Hall (khall)
on 2022-04-11 16:57:57 UTC
(
hide
)
Description:
Bug 30410: (QA follow-up) Pluralise new methods, fix minor issues with language
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-04-11 16:57:57 UTC
Size:
3.47 KB
patch
obsolete
>From d7ee52418240ae313f85982e00a904e0bd08c734 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Mon, 11 Apr 2022 10:33:24 -0400 >Subject: [PATCH] Bug 30410: (QA follow-up) Pluralise new methods, fix minor > issues with language > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/BackgroundJob.pm | 26 ++++++++++----------- > t/db_dependent/Koha/Plugins/BackgroundJob.t | 2 +- > 2 files changed, 14 insertions(+), 14 deletions(-) > >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index 23d1136d6a..e42a9cc903 100644 >--- a/Koha/BackgroundJob.pm >+++ b/Koha/BackgroundJob.pm >@@ -260,22 +260,22 @@ Returns the available types to class mappings. > sub type_to_class_mapping { > my ($self) = @_; > >- my $plugins_mapping = $self->plugin_type_to_class; >+ my $plugins_mapping = $self->plugin_types_to_classes; > > return ($plugins_mapping) >- ? { %{ $self->core_type_to_class }, %{ $self->plugin_type_to_class } } >- : $self->core_type_to_class; >+ ? { %{ $self->core_types_to_classes }, %{ $self->plugin_types_to_classes } } >+ : $self->core_types_to_classes; > } > >-=head3 core_type_to_class >+=head3 core_types_to_classes > >- my $mappings = Koha::BackgrounJob->new->core_type_to_class >+ my $mappings = Koha::BackgrounJob->new->core_types_to_classes > > Returns the core background jobs types to class mappings. > > =cut > >-sub core_type_to_class { >+sub core_types_to_classes { > return { > batch_authority_record_deletion => 'Koha::BackgroundJob::BatchDeleteAuthority', > batch_authority_record_modification => 'Koha::BackgroundJob::BatchUpdateAuthority', >@@ -287,15 +287,15 @@ sub core_type_to_class { > }; > } > >-=head3 plugin_type_to_class >+=head3 plugin_types_to_classes > >- my $mappings = Koha::BackgroundJob->new->plugin_type_to_class >+ my $mappings = Koha::BackgroundJob->new->plugin_types_to_classes > >-Returns the plugin-refined background jobs types to class mappings. >+Returns the plugin-defined background jobs types to class mappings. > > =cut > >-sub plugin_type_to_class { >+sub plugin_types_to_classes { > my ($self) = @_; > > unless ( exists $self->{_plugin_mapping} ) { >@@ -308,9 +308,9 @@ sub plugin_type_to_class { > > unless ( $metadata->{namespace} ) { > Koha::Logger->get->warn( >-"The plugin includes the 'background_tasks' method, but doesn't provide the required 'namespace' method (" >- . $plugin->{class} >- . ')' ); >+ q{A plugin includes the 'background_tasks' method, } >+ . q{but doesn't provide the required 'namespace' } >+ . qq{method ($plugin->{class})} ); > next; > } > >diff --git a/t/db_dependent/Koha/Plugins/BackgroundJob.t b/t/db_dependent/Koha/Plugins/BackgroundJob.t >index 0f5932eca0..8d2a0e5e18 100755 >--- a/t/db_dependent/Koha/Plugins/BackgroundJob.t >+++ b/t/db_dependent/Koha/Plugins/BackgroundJob.t >@@ -76,7 +76,7 @@ subtest 'background_tasks() hooks tests' => sub { > > $bj = Koha::BackgroundJob->new; > $tasks = $bj->type_to_class_mapping; >- $logger->warn_is("The plugin includes the 'background_tasks' method, but doesn't provide the required 'namespace' method (Koha::Plugin::Test)"); >+ $logger->warn_is("A plugin includes the 'background_tasks' method, but doesn't provide the required 'namespace' method (Koha::Plugin::Test)"); > > $schema->storage->txn_rollback; > Koha::Plugins::Methods->delete; >-- >2.20.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 30410
:
132814
|
132815
|
133180
|
133181
|
133192
|
133193
| 133194 |
133195
|
133386