[Rt-commit] [rtir] 01/01: Include the user/search information in the warning.
Kevin Falcone
falcone at bestpractical.com
Thu Jun 13 19:09:53 EDT 2013
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 2.9/warn-on-old-search-formats
in repository rtir.
commit 8a5d3ce983597482e7af3da719477a9dab380614
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Jun 13 19:03:09 2013 -0400
Include the user/search information in the warning.
Borrow the location argument to say "This search was ad-hoc by Bob" or
"This was RT::User-12-SavedSearch-40 executed by Alice" which gives
admins enough rope to find and fix the problematic searches.
---
html/RTIR/Search/Results.html | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/html/RTIR/Search/Results.html b/html/RTIR/Search/Results.html
index d0b8b92..33c99ce 100644
--- a/html/RTIR/Search/Results.html
+++ b/html/RTIR/Search/Results.html
@@ -70,8 +70,14 @@ my $Type = RT::IR::TicketType( Queue => $Queue ) || '';
$Format ||= RT->Config->Get('RTIRSearchResultFormats')->{ $Type . 'Default' };
# Warn if old CFs are found
-RT::IR::Config::CheckObsoleteCFSyntax($Format);
-RT::IR::Config::CheckObsoleteCFSyntax($Query);
+my $location;
+if ($SavedSearchId) {
+ $location = $SavedSearchId eq 'new' ?
+ "an ad-hoc search" : "Saved Search $SavedSearchId";
+ $location .= " executed by ".$session{'CurrentUser'}->Name;
+}
+RT::IR::Config::CheckObsoleteCFSyntax($Format,$location);
+RT::IR::Config::CheckObsoleteCFSyntax($Query,$location);
if ( $Type ) {
$BaseQuery ||= RT::IR->Query( Queue => $Queue );
@@ -93,4 +99,6 @@ $Rows => 50
$Page => 1
$OrderBy => 'id'
$Order => 'ASC'
+$SavedSearchId => undef
+$SavedChartSearchId => undef
</%ARGS>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Rt-commit
mailing list