diff --git a/mozilla/webtools/testopia/Bugzilla/Testopia/TestCase.pm b/mozilla/webtools/testopia/Bugzilla/Testopia/TestCase.pm index 70b8b842859..eccf0fdd5d0 100644 --- a/mozilla/webtools/testopia/Bugzilla/Testopia/TestCase.pm +++ b/mozilla/webtools/testopia/Bugzilla/Testopia/TestCase.pm @@ -1421,7 +1421,7 @@ sub update_deps { $fields->{'blocked'} = $blocks; # From process bug foreach my $field ("dependson", "blocked") { - if ($fields->{$field}) { + if (exists $fields->{$field}) { my @validvalues; foreach my $id (split(/[\s,]+/, $fields->{$field})) { next unless $id; diff --git a/mozilla/webtools/testopia/template/en/default/testopia/case/show.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/case/show.html.tmpl index 42d20d9f22c..a4c50a9cf18 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/case/show.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/case/show.html.tmpl @@ -362,12 +362,12 @@ Ext.onReady(function(){ border: false, height: 200, autoScroll: true, - html:'[% FOREACH dep = case.blocked %][% dep.id FILTER none %][% END %]' + html:'[% FOREACH dep = case.blocked %][% dep.id FILTER none %] [% END %]' },{ border: false, height: 200, autoScroll: true, - html:'[% FOREACH dep = case.dependson %][% dep.id FILTER none %][% END %]' + html:'[% FOREACH dep = case.dependson %][% dep.id FILTER none %] [% END %]' }] }] }] diff --git a/mozilla/webtools/testopia/tr_process_case.cgi b/mozilla/webtools/testopia/tr_process_case.cgi index 8899a0a9078..3b9a82b027a 100755 --- a/mozilla/webtools/testopia/tr_process_case.cgi +++ b/mozilla/webtools/testopia/tr_process_case.cgi @@ -49,7 +49,7 @@ ThrowUserError('testopia-missing-object',{object => 'case'}) unless $case; if ($action eq 'edit'){ print $cgi->header; ThrowUserError("testopia-read-only", {'object' => $case}) unless $case->canedit; - + my $newtcaction = $cgi->param('tcaction') || '' if $cgi->param('tcaction'); my $newtceffect = $cgi->param('tceffect') || '' if $cgi->param('tceffect'); my $newtcsetup = $cgi->param('tcsetup') || '' if $cgi->param('tcsetup'); @@ -60,14 +60,14 @@ if ($action eq 'edit'){ $case->set_case_status($cgi->param('status')) if $cgi->param('status'); $case->set_priority($cgi->param('priority')) if $cgi->param('priority'); $case->set_isautomated($cgi->param('isautomated') eq 'on' ? 1 : 0) if $cgi->param('isautomated'); - $case->set_script($cgi->param('script')) if $cgi->param('script'); - $case->set_arguments($cgi->param('arguments')) if $cgi->param('arguments'); + $case->set_script($cgi->param('script')) if exists $cgi->{'script'}; + $case->set_arguments($cgi->param('arguments')) if exists $cgi->{'arguments'}; $case->set_summary($cgi->param('summary')) if $cgi->param('summary'); - $case->set_requirement($cgi->param('requirement')) if $cgi->param('requirement'); - $case->set_dependson($cgi->param('tcdependson')) if $cgi->param('tcdependson'); - $case->set_blocks($cgi->param('tcblocks')) if $cgi->param('tcblocks'); - $case->set_default_tester($cgi->param('tester')) if $cgi->param('tester'); - $case->set_estimated_time($cgi->param('estimated_time')) if $cgi->param('estimated_time'); + $case->set_requirement($cgi->param('requirement')) if exists $cgi->{'requirement'}; + $case->set_dependson($cgi->param('tcdependson')) if exists $cgi->{'tcdependson'}; + $case->set_blocks($cgi->param('tcblocks')) if exists $cgi->{'tcblocks'}; + $case->set_default_tester($cgi->param('tester')) if exists $cgi->{'tester'}; + $case->set_estimated_time($cgi->param('estimated_time')) if exists $cgi->{'estimated_time'}; $case->add_to_run($cgi->param('addruns')); $case->add_tag($cgi->param('newtag')); diff --git a/mozilla/webtools/testopia/tr_process_plan.cgi b/mozilla/webtools/testopia/tr_process_plan.cgi index 1261facd081..9f3bc86aa68 100755 --- a/mozilla/webtools/testopia/tr_process_plan.cgi +++ b/mozilla/webtools/testopia/tr_process_plan.cgi @@ -161,7 +161,7 @@ elsif ($action eq 'edit'){ $plan->set_type($cgi->param('type')) if $cgi->param('type'); $plan->set_name($cgi->param('name')) if $cgi->param('name'); - if($cgi->param("plandoc")){ + if(exists $cgi->{"plandoc"}){ my $newdoc = $cgi->param("plandoc"); if($plan->diff_plan_doc($newdoc) ne ''){ $plan->store_text($plan->id, Bugzilla->user->id, $newdoc); diff --git a/mozilla/webtools/testopia/tr_process_run.cgi b/mozilla/webtools/testopia/tr_process_run.cgi index 41b44bf3396..8c9b11c9479 100755 --- a/mozilla/webtools/testopia/tr_process_run.cgi +++ b/mozilla/webtools/testopia/tr_process_run.cgi @@ -58,7 +58,7 @@ if ($action eq 'edit'){ $run->set_build($cgi->param('build')) if $cgi->param('build'); $run->set_environment($cgi->param('environment')) if $cgi->param('environment'); $run->set_manager($cgi->param('manager')) if $cgi->param('manager'); - $run->set_notes($cgi->param('run_notes')) if $cgi->param('run_notes'); + $run->set_notes($cgi->param('run_notes')) if exists $cgi->{'run_notes'}; $run->set_stop_date($timestamp) if $cgi->param('status'); $run->update();