Errors with searching and API Run update
git-svn-id: svn://10.0.0.236/trunk@255016 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
44227a6d4a
commit
03f30013a2
@ -384,13 +384,13 @@ sub init {
|
||||
}
|
||||
elsif ($order eq 'assignee') {
|
||||
if ($obj eq 'case_run'){
|
||||
push @supptables, "LEFT JOIN profiles as map_assignee ON map_assignee.userid = test_". $obj ."s.assignee";
|
||||
push @orderby, 'map_assignee.login_name';
|
||||
push @supptables, "LEFT JOIN profiles as map_assignee_order ON map_assignee_order.userid = test_". $obj ."s.assignee";
|
||||
push @orderby, 'map_assignee_order.login_name';
|
||||
}
|
||||
}
|
||||
elsif ($order eq 'testedby') {
|
||||
push @supptables, "LEFT JOIN profiles as map_testedby ON map_testedby.userid = test_". $obj ."s.testedby";
|
||||
push @orderby, 'map_testedby.login_name';
|
||||
push @supptables, "LEFT JOIN profiles as map_testedby_order ON map_testedby_order.userid = test_". $obj ."s.testedby";
|
||||
push @orderby, 'map_testedby_order.login_name';
|
||||
}
|
||||
elsif ($order eq 'tester') {
|
||||
push @supptables, "LEFT JOIN profiles as map_tester ON map_tester.userid = test_". $obj ."s.default_tester_id";
|
||||
@ -1015,7 +1015,7 @@ sub init {
|
||||
"ON case_run.run_id = test_runs.run_id");
|
||||
push(@supptables,
|
||||
"LEFT JOIN profiles AS map_$1 " .
|
||||
"ON case_run.". $1 ." = map_$1.userid");
|
||||
"ON map_$1.userid = case_run.". $1 );
|
||||
}
|
||||
else {
|
||||
push(@supptables,
|
||||
|
||||
@ -181,7 +181,7 @@ sub update {
|
||||
$new_values->{'build_id'} ||= $new_values->{'build'};
|
||||
$new_values->{'environment_id'} ||= $new_values->{'environment'};
|
||||
|
||||
ThrowUserError("testopia-no-status", {field => 'status'}) if $new_values->{'status'} && !$run->canstatus;
|
||||
ThrowUserError("testopia-no-status", {field => 'status'}) if exists $new_values->{'status'} && !$run->canstatus;
|
||||
ThrowUserError("testopia-no-status", {field => 'manager'}) if $new_values->{'manager'} && !$run->canstatus;
|
||||
ThrowUserError("testopia-no-status", {field => 'target'}) if exists $new_values->{'target_pass'} && !$run->canstatus;
|
||||
ThrowUserError("testopia-no-status", {field => 'target'}) if exists $new_values->{'target_completion'} && !$run->canstatus;
|
||||
@ -198,9 +198,9 @@ sub update {
|
||||
|
||||
my $timestamp;
|
||||
$timestamp = $run->stop_date;
|
||||
$timestamp = undef if $new_values->{'status'};
|
||||
$timestamp = undef if $new_values->{'status'} == 1;
|
||||
$timestamp = Bugzilla::Testopia::Util::get_time_stamp() if $new_values->{'status'} == 0 && !$run->stop_date;
|
||||
|
||||
|
||||
$run->set_summary(trim($new_values->{'summary'})) if defined $new_values->{'summary'};
|
||||
$run->set_product_version($new_values->{'product_version'}) if $new_values->{'product_version'};
|
||||
$run->set_plan_text_version($new_values->{'plan_text_version'}) if $new_values->{'plan_text_version'};
|
||||
@ -208,7 +208,7 @@ sub update {
|
||||
$run->set_environment($new_values->{'environment_id'}) if $new_values->{'environment_id'};
|
||||
$run->set_manager($new_values->{'manager_id'}) if $new_values->{'manager_id'};
|
||||
$run->set_notes($new_values->{'notes'}) if defined $new_values->{'notes'};
|
||||
$run->set_stop_date($timestamp) if $new_values->{'status'};
|
||||
$run->set_stop_date($timestamp) if exists $new_values->{'status'};
|
||||
$run->set_target_pass($new_values->{'target_pass'}) if defined $new_values->{'target_pass'};
|
||||
$run->set_target_completion($new_values->{'target_completion'}) if defined $new_values->{'target_completion'};
|
||||
|
||||
|
||||
@ -297,6 +297,7 @@ if (defined($Bugzilla_login)) {
|
||||
#$soapresult = $proxy->call('TestRun.remove_tag', 501, 'fish' );
|
||||
#$soapresult = $proxy->call('TestRun.update', 501, {environment_id => 'test', build_id => 'linux', summary => 'API TEST RUN', manager_id => 'ghendricks@novell.com', product_version=>'1.2'});
|
||||
#$soapresult = $proxy->call('TestRun.update', 501, { summary => 'API TEST RUN', manager_id => 'ghendricks@novell.com', product_version=>'1.2'});
|
||||
#$soapresult = $proxy->call('TestRun.update', 501, { status => 0});
|
||||
|
||||
#$soapresult = $proxy->call('User.lookup_login_by_id', 9 );
|
||||
#$soapresult = $proxy->call('User.lookup_id_by_login', 'ghendricks@novell.com' );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user