From 67a3eac25b0c9ef816e1b5375c265f4899866066 Mon Sep 17 00:00:00 2001 From: "ghendricks%novell.com" Date: Thu, 8 Feb 2007 22:31:19 +0000 Subject: [PATCH] Order quicksearch results by name. Don't update status unless it is different --- webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm | 2 +- .../template/en/default/testopia/caserun/short-form.html.tmpl | 2 +- webtools/testopia/testopia/js/caserun.js | 4 +++- webtools/testopia/tr_quicksearch.cgi | 3 +++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm b/webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm index 3d8bb36e094..215c35d3a36 100644 --- a/webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm +++ b/webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm @@ -365,7 +365,7 @@ if the status is a closed status. sub set_status { my $self = shift; my ($status_id) = @_; - + return if $self->status_id == $status_id; my $oldstatus = $self->status; my $newstatus = $self->lookup_status($status_id); diff --git a/webtools/testopia/template/en/default/testopia/caserun/short-form.html.tmpl b/webtools/testopia/template/en/default/testopia/caserun/short-form.html.tmpl index 3c9b96442a1..a11e4a94d94 100644 --- a/webtools/testopia/template/en/default/testopia/caserun/short-form.html.tmpl +++ b/webtools/testopia/template/en/default/testopia/caserun/short-form.html.tmpl @@ -65,7 +65,7 @@ [% status.name FILTER none %] (disabled) [% ELSE %] - + [% status.name FILTER none %] [% END %] diff --git a/webtools/testopia/testopia/js/caserun.js b/webtools/testopia/testopia/js/caserun.js index 6a9a5a2d5bc..ee75e2dedef 100755 --- a/webtools/testopia/testopia/js/caserun.js +++ b/webtools/testopia/testopia/js/caserun.js @@ -116,7 +116,9 @@ function chEnv(idx, eid, sid, cid, oldid){ }); } //chStat updates the status -function chStat(idx, sid, cid){ +function chStat(idx, sid, cid, osid){ + if (osid == sid) + return; displayMsg('pp'+idx, 3, MSG_WAIT.blink()); disableAllButtons(true); dojo.io.bind({ diff --git a/webtools/testopia/tr_quicksearch.cgi b/webtools/testopia/tr_quicksearch.cgi index 8b303ab363f..8145d9f5626 100755 --- a/webtools/testopia/tr_quicksearch.cgi +++ b/webtools/testopia/tr_quicksearch.cgi @@ -193,6 +193,7 @@ else{ "SELECT name, environment_id FROM test_environments WHERE name like ? + ORDER BY name LIMIT 20", undef, $search); print objToJson($ref); @@ -213,6 +214,7 @@ else{ JOIN test_case_tags on test_case_tags.tag_id = test_tags.tag_id JOIN test_case_runs on test_case_runs.case_id = test_case_tags.case_id WHERE tag_name like ? AND test_case_runs.run_id = ? + ORDER BY tag_name LIMIT 20", undef, ($search, $run_id)); } @@ -221,6 +223,7 @@ else{ "SELECT tag_name, tag_id FROM test_tags WHERE tag_name like ? + ORDER BY tag_name LIMIT 20", undef, $search); }