[Rt-commit] rt branch, 4.0/advanced-keeps-saved-search, created. rt-3.9.7-1220-g12bacce
Alex Vandiver
alexmv at bestpractical.com
Thu Jan 20 21:07:41 EST 2011
The branch, 4.0/advanced-keeps-saved-search has been created
at 12bacce9ba19feca4b1040991a4e0ac711b44f35 (commit)
- Log -----------------------------------------------------------------
commit bdbad008b7c3fcb1ee58bce3359896bfe8f65125
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jan 20 20:59:11 2011 -0500
Make the menu items not lose the search directly after loading
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 7a1dc9c..e4ead4d 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -566,7 +566,7 @@ my $build_admin_menu = sub {
my $args = '';
my $has_query = '';
my $current_search = $session{"CurrentSearchHash"} || {};
- my $search_id = $m->request_args->{'SavedSearchId'} || $search->{'SearchId'} || '';
+ my $search_id = $m->request_args->{'SavedSearchLoad'} || $m->request_args->{'SavedSearchId'} || $search->{'SearchId'} || '';
$has_query = 1 if ( $m->request_args->{'Query'} or $current_search->{'Query'} );
commit 6ba5b1e85d57b18029b637582be554cd44ef39c5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jan 20 20:59:32 2011 -0500
Remove empty query parameters from URI when building
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index e4ead4d..b4c2ea9 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -585,6 +585,8 @@ my $build_admin_menu = sub {
for my $field (qw(Order OrderBy)) {
if ( ref( $query_args{$field} ) eq 'ARRAY' ) {
$query_args{$field} = join( "|", @{ $query_args{$field} } );
+ } elsif (not defined $query_args{$field}) {
+ delete $query_args{$field};
}
}
commit 24c73663c400bf4b1bec3cfba0aac2c496a09cac
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jan 20 21:00:04 2011 -0500
Minor reformat
diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html
index 3598070..8800ed0 100644
--- a/share/html/Search/Build.html
+++ b/share/html/Search/Build.html
@@ -173,7 +173,11 @@ my $tree = $ParseQuery->( $query{'Query'}, \@parse_results );
# if parsing went poorly, send them to the edit page to fix it
if ( @parse_results ) {
- return $m->comp( "Edit.html", Query => $query{'Query'}, actions => \@actions );
+ return $m->comp(
+ "Edit.html",
+ Query => $query{'Query'},
+ actions => \@actions,
+ );
}
my @options = $tree->GetDisplayedNodes;
commit b9087f4fa53d0c64289ee28dd4b7848076e9337b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jan 20 21:01:14 2011 -0500
When pushing to Edit.html because of broken syntax, preserve saved search id
diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html
index 8800ed0..1a452c9 100644
--- a/share/html/Search/Build.html
+++ b/share/html/Search/Build.html
@@ -176,6 +176,7 @@ if ( @parse_results ) {
return $m->comp(
"Edit.html",
Query => $query{'Query'},
+ SavedSearchId => $saved_search{'Id'},
actions => \@actions,
);
}
commit 4324605e540338eebb413f34bc389b73c29ef296
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jan 20 21:02:50 2011 -0500
When pushing to Edit.html because of broken syntax, preserve format
diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html
index 1a452c9..2f3c355 100644
--- a/share/html/Search/Build.html
+++ b/share/html/Search/Build.html
@@ -176,6 +176,7 @@ if ( @parse_results ) {
return $m->comp(
"Edit.html",
Query => $query{'Query'},
+ Format => $query{'Format'},
SavedSearchId => $saved_search{'Id'},
actions => \@actions,
);
commit 2439ddfb90df791c020801e3fafda5c1bb80442e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jan 20 21:03:59 2011 -0500
Skip a bunch of invalid SQL warnings on invalid TicketSQL by overriding it with a known-good empty result set
diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index cb7bce9..70d76ac 100755
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -99,7 +99,9 @@ $Page = 1 unless $Page && $Page > 0;
my ($title, $ticketcount);
$session{'i'}++;
$session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) ;
-$session{'tickets'}->FromSQL($Query) if ($Query);
+my ($ok, $msg) = $Query ? $session{'tickets'}->FromSQL($Query) : (1, "Vacuously OK");
+# Provide an empty search if parsing failed
+$session{'tickets'}->FromSQL("id < 0") unless ($ok);
if ($OrderBy =~ /\|/) {
# Multiple Sorts
commit 12bacce9ba19feca4b1040991a4e0ac711b44f35
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jan 20 21:04:46 2011 -0500
Provide a summary of what is broken when pushing to Edit.html on invalid TicketSQL
diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html
index 2f3c355..a76009f 100644
--- a/share/html/Search/Build.html
+++ b/share/html/Search/Build.html
@@ -173,6 +173,7 @@ my $tree = $ParseQuery->( $query{'Query'}, \@parse_results );
# if parsing went poorly, send them to the edit page to fix it
if ( @parse_results ) {
+ push @actions, @parse_results;
return $m->comp(
"Edit.html",
Query => $query{'Query'},
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list