Bugzilla – Attachment 154649 Details for
Bug 34519
Add a template plugin for ExtendedAttributeTypes to fetch searchable patron attributes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34519: (follow-up) fix QA tool complaints
Bug-34519-follow-up-fix-QA-tool-complaints.patch (text/plain), 3.64 KB, created by
Nick Clemens (kidclamp)
on 2023-08-18 12:17:22 UTC
(
hide
)
Description:
Bug 34519: (follow-up) fix QA tool complaints
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-08-18 12:17:22 UTC
Size:
3.64 KB
patch
obsolete
>From fee01f8edca3c3b10b43d5cb5206d89076f17e5e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 18 Aug 2023 12:16:29 +0000 >Subject: [PATCH] Bug 34519: (follow-up) fix QA tool complaints > >--- > Koha/Template/Plugin/ExtendedAttributeTypes.pm | 4 ++-- > .../Template/Plugin/ExtendedAttributeTypes.t | 18 +++++++++--------- > 2 files changed, 11 insertions(+), 11 deletions(-) > mode change 100644 => 100755 t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t > >diff --git a/Koha/Template/Plugin/ExtendedAttributeTypes.pm b/Koha/Template/Plugin/ExtendedAttributeTypes.pm >index 991666d164a..9511b7325e2 100644 >--- a/Koha/Template/Plugin/ExtendedAttributeTypes.pm >+++ b/Koha/Template/Plugin/ExtendedAttributeTypes.pm >@@ -55,14 +55,14 @@ Koha::Template::Plugin::ExtendedAttributeTypes - TT Plugin for retrieving patron > In a template, you can get the searchable attribute types with > the following TT code: [% ExtendedAttributes.all( staff_searchable => 1 ) %] > >-The function returns the Koha::Patron::Atribute::Type objects >+The function returns the Koha::Patron::Attribute::Type objects > > =head2 codes > > In a template, you can get the searchable attribute type codes with > the following TT code: [% ExtendedAttributes.codes( staff_searchable => 1 ) %] > >-The function returns the Koha::Patron::Atribute::Type codes as an array >+The function returns the Koha::Patron::Attribute::Type codes as an array > > =head1 AUTHOR > >diff --git a/t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t b/t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t >old mode 100644 >new mode 100755 >index df1deae3a65..8ba60d89968 >--- a/t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t >+++ b/t/db_dependent/Koha/Template/Plugin/ExtendedAttributeTypes.t >@@ -42,34 +42,34 @@ my $typeA = $builder->build_object( > class => 'Koha::Patron::Attribute::Types', > value => { > staff_searchable => 0, >- description => "Desc type A", >+ description => "Desc type A", > } > } > ); > my $typeB = $builder->build_object( > { >- class => 'Koha::Patron::Attribute::Types', >+ class => 'Koha::Patron::Attribute::Types', > value => { > staff_searchable => 1, >- description => "Desc type B", >+ description => "Desc type B", > } > } > ); > >-my $all_plugin = $plugin->all(); >+my $all_plugin = $plugin->all(); > my $all_objects = Koha::Patron::Attribute::Types->search(); > >-is_deeply( $all_plugin->unblessed, $all_objects->unblessed, "all method returns all the types correctly"); >+is_deeply( $all_plugin->unblessed, $all_objects->unblessed, "all method returns all the types correctly" ); > > my $all_plugin_codes = $plugin->codes(); > my $all_object_codes = Koha::Patron::Attribute::Types->search()->get_column('code'); > >-is_deeply( $all_plugin_codes, $all_object_codes, "codes method returns the codes as expected"); >+is_deeply( $all_plugin_codes, $all_object_codes, "codes method returns the codes as expected" ); > >-my $searchable_plugin_codes = $plugin->codes({ staff_searchable => 1 }); >-my $searchable_object_codes = Koha::Patron::Attribute::Types->search({ staff_searchable => 1 })->get_column('code'); >+my $searchable_plugin_codes = $plugin->codes( { staff_searchable => 1 } ); >+my $searchable_object_codes = Koha::Patron::Attribute::Types->search( { staff_searchable => 1 } )->get_column('code'); > >-is_deeply( $searchable_plugin_codes, $searchable_object_codes, "searching plugin method works as expected"); >+is_deeply( $searchable_plugin_codes, $searchable_object_codes, "searching plugin method works as expected" ); > > $schema->storage->txn_rollback; > >-- >2.30.2
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 34519
:
154375
|
154376
|
154384
|
154641
|
154646
|
154647
|
154648
|
154649
|
157649
|
157650
|
157651
|
157652
|
158423
|
158424
|
158425
|
158426