diff --git a/mozilla/webtools/testopia/Bugzilla/Testopia/Table.pm b/mozilla/webtools/testopia/Bugzilla/Testopia/Table.pm index 04117684650..39d66d719d8 100644 --- a/mozilla/webtools/testopia/Bugzilla/Testopia/Table.pm +++ b/mozilla/webtools/testopia/Bugzilla/Testopia/Table.pm @@ -397,7 +397,7 @@ the page navigation links to move from page to page. sub get_page_url { my $self = shift; my $cgi = $self->{'cgi'}; - return $self->{'url_loc'} ."?". $cgi->canonicalise_query('page', 'pagesize'); + return $self->{'url_loc'} ."?". $cgi->canonicalise_query('page', 'pagesize', 'viewall'); } sub get_url { diff --git a/mozilla/webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm b/mozilla/webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm index 0e974bfe50a..0527024230d 100644 --- a/mozilla/webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm +++ b/mozilla/webtools/testopia/Bugzilla/Testopia/TestCaseRun.pm @@ -369,7 +369,6 @@ sub set_status { } my $note = "Status changed from $oldstatus to $newstatus by ". Bugzilla->user->login; - $note .= " for build '". $self->build->name ."' and environment '". $self->environment->name; $self->append_note($note); $self->{'case_run_status_id'} = $status_id; $self->{'status'} = undef; @@ -381,8 +380,8 @@ sub set_sortkey { my $dbh = Bugzilla->dbh; $dbh->do("UPDATE test_case_runs SET sortkey = ? - WHERE case_id = ? AND run_id = ?", - undef, ($sortkey, $self->case_id, $self->run_id)); + WHERE case_run_id = ?", + undef, ($sortkey, $self->id)); } @@ -404,8 +403,6 @@ sub set_assignee { my $note = "Assignee changed from $oldassignee to ". $newassignee->login; $note .= " by ". Bugzilla->user->login; - $note .= " for build '". $self->build->name; - $note .= "' and environment '". $self->environment->name; $self->append_note($note); } @@ -761,9 +758,8 @@ sub notes { my $notes = $dbh->selectcol_arrayref( "SELECT notes FROM test_case_runs - WHERE case_id = ? AND run_id = ? - ORDER BY case_run_id", - undef,($self->case_id, $self->run_id)); + WHERE case_run_id = ?", + undef,($self->id)); return join("\n", @$notes); } diff --git a/mozilla/webtools/testopia/template/en/default/testopia/blocks.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/blocks.html.tmpl index 4c99b5bfd0d..7df75a51be0 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/blocks.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/blocks.html.tmpl @@ -38,6 +38,10 @@ [% END %] +[%############################################################################%] +[%# Block for Navigation Links #%] +[%############################################################################%] + [% BLOCK navigation %] [% SET MAX_LIMIT = 10000 %] [% IF ajax %] @@ -47,6 +51,7 @@ [% url = "$table.get_page_url&pagesize=$table.page_size&page="%] [%# url = "$table.url_loc?direction=$direction&getlist=1&page="%] [% END %] +[% IF NOT table.viewall %] [% pagesizelist = [{name => 25, id => 25}, {name => 50, id => 50}, {name => 100, id => 100}, @@ -134,7 +139,7 @@ [% IF ajax %] View All  [% ELSE %] - [% IF table.list_count < MAX_LIMIT %] + [% IF table.list_count < MAX_LIMIT AND table.list_count > table.page_size %] View All  [% ELSE %] View All @@ -145,4 +150,12 @@ [% table.list_count %] records found [% '(filtered)' IF filtered %] +[% ELSE %] + + + + + +
Paged View
[% table.list_count %] records found [% '(filtered)' IF filtered %]
+[% END %] [% END %] diff --git a/mozilla/webtools/testopia/template/en/default/testopia/case/form.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/case/form.html.tmpl index 449bdcc2713..dc011af7974 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/case/form.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/case/form.html.tmpl @@ -128,7 +128,7 @@ - Category + Category [% PROCESS select sel = { name => 'category', accesskey => 'c', diff --git a/mozilla/webtools/testopia/template/en/default/testopia/case/table.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/case/table.html.tmpl index 989b57b4705..d2e1f2a280a 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/case/table.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/case/table.html.tmpl @@ -132,9 +132,7 @@ Select: [% END %] [% END %] - [% IF NOT table.viewall %] - [% PROCESS navigation %] - [% END %] + [% PROCESS navigation %] [% DECORATIVE_BORDER_END %] [%# No else clause required here -- see list.html.tmpl just below diff --git a/mozilla/webtools/testopia/template/en/default/testopia/caserun/case-history.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/caserun/case-history.html.tmpl index 0168130ba14..ef7abe155b6 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/caserun/case-history.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/caserun/case-history.html.tmpl @@ -78,9 +78,7 @@ Select: [% END %] -[% IF NOT table.viewall %] - [% PROCESS navigation %] -[% END %] +[% PROCESS navigation %] [% DECORATIVE_BORDER_END %] [% ELSE %] diff --git a/mozilla/webtools/testopia/template/en/default/testopia/caserun/table.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/caserun/table.html.tmpl index 5b55607b360..c4665d05bd2 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/caserun/table.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/caserun/table.html.tmpl @@ -61,7 +61,7 @@
Summary:  [% caserun.case.summary FILTER html %]
- + [% PROCESS "testopia/caserun/short-form-header.html.tmpl" %] @@ -71,9 +71,7 @@ [% END %] -[% IF NOT table.viewall %] [% PROCESS navigation %] -[% END %] [% DECORATIVE_BORDER_END %] diff --git a/mozilla/webtools/testopia/template/en/default/testopia/environment/table.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/environment/table.html.tmpl index 621fbe4c68c..ff419444564 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/environment/table.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/environment/table.html.tmpl @@ -48,9 +48,7 @@ [% END %] - [% IF NOT table.viewall %] [% PROCESS navigation %] - [% END %] [% DECORATIVE_BORDER_END %]
diff --git a/mozilla/webtools/testopia/template/en/default/testopia/plan/table.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/plan/table.html.tmpl index 4afbe61fa74..181a919a1b6 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/plan/table.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/plan/table.html.tmpl @@ -73,8 +73,6 @@ Select: -[% IF NOT table.viewall %] [% PROCESS navigation %] -[% END %] [% DECORATIVE_BORDER_END %] [% END %] diff --git a/mozilla/webtools/testopia/template/en/default/testopia/run/form.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/run/form.html.tmpl index d7d041158ca..ffe8214928b 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/run/form.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/run/form.html.tmpl @@ -97,7 +97,6 @@ id="environment" name="environment" maxListLength="10" - style="width:200px; height:15px" value="[% run.environment.id FILTER none %]" > [% IF action == 'Add' %] or New: @@ -107,13 +106,13 @@ Summary - + Notes: - diff --git a/mozilla/webtools/testopia/template/en/default/testopia/run/show.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/run/show.html.tmpl index 125e9e09623..3aeac2cec00 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/run/show.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/run/show.html.tmpl @@ -46,7 +46,8 @@ @@ -174,6 +175,7 @@

Test Case Run Logs

[% PROCESS testopia/caserun/filter.html.tmpl %]
+[% IF run.canedit %]
@@ -184,15 +186,12 @@
- [% IF run.canedit %] [% PROCESS select sel = { name => "caserun_build", list => run.plan.product.builds(1), } %] - [% END %] - [% IF run.canedit %] - [% END %]
- or Add several at once + or Add several at once
+[% END %] [% PROCESS testopia/caserun/table.html.tmpl %] [% table.list_count FILTER none %] test cases found. diff --git a/mozilla/webtools/testopia/template/en/default/testopia/run/table.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/run/table.html.tmpl index c299a26f3d0..52c4f7af947 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/run/table.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/run/table.html.tmpl @@ -72,9 +72,7 @@ Select: [% IF NOT plan %]
[% run.plan.id FILTER html %][% END %] [% END %] - [% IF NOT table.viewall %] [% PROCESS navigation %] - [% END %] [% DECORATIVE_BORDER_END %] diff --git a/mozilla/webtools/testopia/testopia/js/caserun.js b/mozilla/webtools/testopia/testopia/js/caserun.js index 28effd0a7bd..a039fdeaaf3 100755 --- a/mozilla/webtools/testopia/testopia/js/caserun.js +++ b/mozilla/webtools/testopia/testopia/js/caserun.js @@ -206,9 +206,7 @@ function chOwn(idx, cid, owner){ function chSortKey(idx, cid, svalue){ displayMsg('pp'+idx, 3, MSG_WAIT.blink()); disableAllButtons(true); - document.getElementById('ra'+idx).style.display='block'; - document.getElementById('id'+idx).src='testopia/img/td.gif'; - + dojo.io.bind({ url: "tr_show_caserun.cgi", content: { caserun_id: cid, index: idx, sortkey: svalue, action: 'update_sortkey'}, diff --git a/mozilla/webtools/testopia/tr_list_runs.cgi b/mozilla/webtools/testopia/tr_list_runs.cgi index ed8d74580fd..7e784793124 100755 --- a/mozilla/webtools/testopia/tr_list_runs.cgi +++ b/mozilla/webtools/testopia/tr_list_runs.cgi @@ -92,18 +92,7 @@ if ($action eq 'Commit'){ push @uneditable, $run; next; } - - my $error_mode_cache = Bugzilla->error_mode; - Bugzilla->error_mode(ERROR_MODE_DIE); - eval{ - login_to_id(trim($cgi->param('manager'))); - }; - Bugzilla->error_mode($error_mode_cache); - if ($@){ - print $cgi->multipart_end if $serverpush; - } my $manager = login_to_id(trim($cgi->param('manager'))); - trick_taint($manager); if ($cgi->param('manager') && !$manager){ print $cgi->multipart_end if $serverpush; @@ -145,9 +134,11 @@ if ($action eq 'Commit'){ print $cgi->multipart_start; } my $run = Bugzilla::Testopia::TestRun->new({}); + my $updated = $i - scalar @uneditable; $vars->{'run'} = $run; $vars->{'title'} = $i ? "Update Successful" : "Nothing Updated"; - $vars->{'tr_message'} = "$i Test Runs Updated" if $i; + $vars->{'tr_error'} = "You did not have rights to edit ". scalar @uneditable . "runs" if scalar @uneditable > 0; + $vars->{'tr_message'} = "$updated Test Runs Updated"; $vars->{'current_tab'} = 'run'; $vars->{'build_list'} = $run->get_distinct_builds(); $template->process("testopia/search/advanced.html.tmpl", $vars)