Fix lookup by product (object) in the webservice
This commit is contained in:
ghendricks%novell.com 2008-04-30 17:13:24 +00:00
Родитель 869e779b80
Коммит 66ab1ddafc
6 изменённых файлов: 15 добавлений и 19 удалений

Просмотреть файл

@ -54,7 +54,7 @@ sub check_build {
Bugzilla->login(LOGIN_REQUIRED);
if (ref $product){
$product = $product;
$product = Bugzilla::Testopia::Product->new($product->{id});
}
elsif ($product =~ /^\d+$/){
$product = Bugzilla::Testopia::Product->new($product);

Просмотреть файл

@ -53,7 +53,7 @@ sub check_environment {
Bugzilla->login(LOGIN_REQUIRED);
if (ref $product){
$product = $product;
$product = Bugzilla::Testopia::Product->new($product->{id});
}
elsif ($product =~ /^\d+$/){
$product = Bugzilla::Testopia::Product->new($product);

Просмотреть файл

@ -34,7 +34,7 @@ sub _validate {
Bugzilla->login(LOGIN_REQUIRED);
if (ref $product){
$product = $product;
$product = Bugzilla::Testopia::Product->new($product->{id});
}
elsif ($product =~ /^\d+$/){
$product = Bugzilla::Testopia::Product->new($product);
@ -81,7 +81,7 @@ sub check_category {
Bugzilla->login(LOGIN_REQUIRED);
if (ref $product){
$product = $product;
$product = Bugzilla::Testopia::Product->new($product->{id});
}
elsif ($product =~ /^\d+$/){
$product = Bugzilla::Testopia::Product->new($product);
@ -103,7 +103,7 @@ sub check_component {
Bugzilla->login(LOGIN_REQUIRED);
if (ref $product){
$product = $product;
$product = Bugzilla::Testopia::Product->new($product->{id});
}
elsif ($product =~ /^\d+$/){
$product = Bugzilla::Testopia::Product->new($product);

Просмотреть файл

@ -58,15 +58,9 @@
[% FOREACH row = report.row_names %]
[% row_total = 0 %]
[% IF report.row_field == 'bug_status' %]
[% status_descs.$row FILTER csv -%]
[% ELSIF report.row_field == 'resolution' %]
[% resolution_descs.$row FILTER csv -%]
[% ELSE %]
[% row FILTER csv -%]
[% END %]
[% row FILTER csv -%]
[% FOREACH col = report.col_names %]
[% row_total = row_total + data.$tbl.$col.$row %]
[% row_total = row_total + report.data.$tbl.$col.$row %]
[% colsepchar %]
[% IF report.data.$tbl AND report.data.$tbl.$col AND report.data.$tbl.$col.$row %]
[% col_totals.$col = col_totals.$col + report.data.$tbl.$col.$row %]
@ -81,7 +75,7 @@
[% grand_total = grand_total + row_total %]
[% END %]
[% 'Total' FILTER csv %]
[% FOREACH col = col_names %]
[% FOREACH col = report.col_names %]
[% NEXT IF col == "" %]
[% colsepchar %]
[% col_totals.$col %]

Просмотреть файл

@ -58,6 +58,9 @@ use HTTP::Cookies;
use Carp;
use Data::Dumper;
use lib '../../../..';
use Bugzilla::Testopia::Product;
my $help;
my $Bugzilla_uri;
my $Bugzilla_login;
@ -141,13 +144,13 @@ if (defined($Bugzilla_login)) {
}
}
#####################
### Build Methods ###
#####################
#$soapresult = $proxy->call('Build.check_build', 'Linux', 2);
#$soapresult = $proxy->call('Build.check_build', 'Linux', 'Bugzilla');
#$soapresult = $proxy->call('Build.check_build', 'Linux', Bugzilla::Testopia::Product->new(2));
#$soapresult = $proxy->call('Build.create', {name=>'Build '. time(), product_id=>2, isactive=>0, description=> 'API Test Build - IGNORE'});
#$soapresult = $proxy->call('Build.get', 1140);
#$soapresult = $proxy->call('Build.update', 1140, { description=>'This is a description', milestone=>'3.0', isactive=>0});
@ -155,9 +158,9 @@ if (defined($Bugzilla_login)) {
###########################
### Environment Methods ###
###########################
#$soapresult = $proxy->call('Environment.check_environment', 'Linux', 2);
#$soapresult = $proxy->call('Environment.check_environment', 'Linux', 'Bugzilla');
#$soapresult = $proxy->call('Environment.check_environment', 'Linux', Bugzilla::Testopia::Product->new(2));
#$soapresult = $proxy->call('Environment.create', {product_id=>2, name=>'Environment '.time() , isactive=>1});
#$soapresult = $proxy->call('Environment.get', 1018);
#$soapresult = $proxy->call('Environment.list', {environment_id=>330});
@ -217,7 +220,7 @@ if (defined($Bugzilla_login)) {
#$soapresult = $proxy->call('TestCase.store_text', 278, 'vrb@novell.com', 'FOO', 'FISH', 'FIGHT', 'FUN');
#$soapresult = $proxy->call('TestCase.unlink_plan', 278, 78);
#$soapresult = $proxy->call('TestCase.update', 278,{priority_id => 'P2 - High', case_status_id=>3 ,summary=>'This was Entering bugs', category_id => '142'});
$soapresult = $proxy->call('TestCase.update',435838 ,{ summary => 'API TEST', category_id => '1666'});
#$soapresult = $proxy->call('TestCase.update',435838 ,{ summary => 'API TEST', category_id => '1666'});
###########################

Просмотреть файл

@ -404,8 +404,7 @@ sub remove_field_list
#
if ( $tcdb )
{
my @args = ( "-u -o " . $work_filename . " " . $work_filename );
system("sort", @args) == 0 or error("Could not sort $work_filename");
system("sort -u -o " . $work_filename . " " . $work_filename) == 0 or error("Could not sort $work_filename");
}
return $field_list;