Bugzilla – Attachment 182434 Details for
Bug 33430
Use REST API for suggestions tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33430: (follow-up) Fix the data filtering from the left menu
Bug-33430-follow-up-Fix-the-data-filtering-from-th.patch (text/plain), 3.18 KB, created by
Matt Blenkinsop
on 2025-05-14 10:01:20 UTC
(
hide
)
Description:
Bug 33430: (follow-up) Fix the data filtering from the left menu
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-05-14 10:01:20 UTC
Size:
3.18 KB
patch
obsolete
>From dd03e47eeb142b8970d12c96eec86b0cd8fd1807 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Wed, 14 May 2025 11:00:09 +0100 >Subject: [PATCH] Bug 33430: (follow-up) Fix the data filtering from the left > menu > >--- > .../prog/en/modules/suggestion/suggestion.tt | 4 ++-- > suggestion/suggestion.pl | 13 ++++++++++--- > 2 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index ce2e9702b3b..2762234f099 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1326,7 +1326,7 @@ > let suggestionData = [% To.json(suggestions) | $raw %]; > var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %] > function loadDatatable(tabName) { >- let tabSuggestionData = suggestionData.find(s => s.suggestiontype === tabName) >+ let tabSuggestionData = suggestionData.find(s => s.suggestiontype === `${tabName}`) > $("#table_" + tabName).kohaTable( > { > sorting: [[4, "asc"]], >@@ -1479,7 +1479,7 @@ > { > data: "status", > searchable: false, >- orderable: false, >+ orderable: true, > render: function (data, type, row, meta) { > if(row.status === 'ASKED') return '<span>%s</span>'.format(_("Pending")); > if(row.status === 'ACCEPTED') return '<span>%s</span>'.format(_("Accepted")); >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index de37a7196f6..39521c6495c 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -456,14 +456,21 @@ if ( $op eq 'else' ) { > || $search_params->{$f} eq ''; > } > for my $bi (qw (title author isbn publishercode copyrightdate collectiontitle)) { >- $search_params->{$bi} = { 'LIKE' => "%" . $search_params->{$bi} . "%" } if $search_params->{$bi}; >+ if ( $search_params->{$bi} ) { >+ $search_params->{"me.$bi"} = { 'like' => "%" . $search_params->{$bi} . "%" }; >+ delete $search_params->{$bi}; >+ } > } > > $search_params->{archived} = 0 if !$filter_archived; > foreach my $key ( keys %$search_params ) { > if ( $key eq 'branchcode' ) { >- my $branch_param = delete $search_params->{$key}; >- $search_params->{"me.branchcode"} = $branch_param; >+ if ( $displayby ne 'branchcode' ) { >+ my $branch_param = delete $search_params->{$key}; >+ $search_params->{"me.branchcode"} = $branch_param; >+ } else { >+ delete $search_params->{$key}; >+ } > } > } > >-- >2.48.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 33430
:
182146
|
182147
|
182148
|
182149
|
182150
|
182161
|
182196
|
182197
|
182198
|
182199
|
182200
|
182202
|
182203
|
182204
|
182205
|
182206
|
182207
|
182208
|
182209
|
182210
|
182211
|
182339
|
182340
|
182341
|
182342
|
182343
|
182428
|
182429
|
182430
|
182431
|
182432
|
182433
|
182434
|
182478
|
182480
|
182481
|
182482
|
182483
|
182484
|
182485
|
182486
|
182487
|
182493
|
182494
|
182495
|
182496
|
182497
|
182498
|
182499
|
182500
|
182577
|
182578