Bugzilla – Attachment 37969 Details for
Bug 10706
keyword search on reports should search report number
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10706: Search reports by id
Bug-10706-Search-reports-by-id.patch (text/plain), 1.56 KB, created by
Jonathan Druart
on 2015-04-16 15:26:40 UTC
(
hide
)
Description:
Bug 10706: Search reports by id
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-16 15:26:40 UTC
Size:
1.56 KB
patch
obsolete
>From 29afb086e86a6eb275dad0702d820abc318a0be2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 16 Apr 2015 17:23:37 +0200 >Subject: [PATCH] Bug 10706: Search reports by id > >This patch adds the ability to search reports by their id. > >Test plan: >1/ Go on the saved report list (reports/guided_reports.pl?phase=Use saved) >2/ Search for a report id (refer to the ID column in the table) >3/ The result should be consistent > >That the filters are not kept, already existed. >--- > C4/Reports/Guided.pm | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index aaa1ce2..77bac4c 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -678,12 +678,14 @@ sub get_saved_reports { > push @args, $author, $author; > } > if (my $keyword = $filter->{keyword}) { >- $keyword = "%$keyword%"; >- push @cond, "report LIKE ? OR >- report_name LIKE ? OR >- notes LIKE ? OR >- savedsql LIKE ?"; >- push @args, $keyword, $keyword, $keyword, $keyword; >+ push @cond, q| >+ report LIKE ? >+ OR report_name LIKE ? >+ OR notes LIKE ? >+ OR savedsql LIKE ? >+ OR s.id = ? >+ |; >+ push @args, "%$keyword%", "%$keyword%", "%$keyword%", "%$keyword%", $keyword; > } > if ($filter->{group}) { > push @cond, "report_group = ?"; >-- >2.1.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 10706
:
37969
|
37988
|
38008
|
38046
|
38048
|
38049
|
38051