Removed tabs

git-svn-id: svn://10.0.0.236/trunk@219666 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ghendricks%novell.com
2007-02-07 21:53:57 +00:00
parent 8002c5c576
commit d5fd7fc9ce
31 changed files with 524 additions and 528 deletions

View File

@@ -142,16 +142,16 @@ sub parse() {
else {
$self->{'message'} = "Parsing and Validating XML Environment...<BR />";
}
$self->{'error'} = undef;
if ($xml) {
trick_taint($xml);
}
my $twig = XML::Twig->new();
$twig->parse($xml);
my $root = $twig->root;
# Checking if Product and Environment already exist.
my $product_name = $root->{'att'}->{'product'};
my $product_id;
$self->{'error'} = undef;
if ($xml) {
trick_taint($xml);
}
my $twig = XML::Twig->new();
$twig->parse($xml);
my $root = $twig->root;
# Checking if Product and Environment already exist.
my $product_name = $root->{'att'}->{'product'};
my $product_id;
if (lc($product_name) eq "--all--") {
$self->{'message'} .= "..Using the <U>--ALL--</U> <STRONG>PRODUCT</STRONG>.<BR />";
$product_id = 0;
@@ -171,33 +171,33 @@ sub parse() {
($self->{'product_id'}) = $product_id;
$self->{'product_name'} = $product_name;
my $environment_name = $root->{'att'}->{'name'};
$self->{'name'} = $environment_name;
$self->{'name'} = $environment_name;
$self->{'message'} .= "..Checking if <U>$environment_name</U> <STRONG>ENVIRONMENT NAME</STRONG> already exists for the <U>$product_name</U> <STRONG>PRODUCT</STRONG>...";
my $environment = Bugzilla::Testopia::Environment->new({});
my ($env_id) = $environment->check_environment($environment_name, $product_id);
my $environment_id;
if ($env_id < 1) {
$self->{'message'} .= "<U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U><BR />";
# Storing New Environment if Admin
my $environment_id;
if ($env_id < 1) {
$self->{'message'} .= "<U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U><BR />";
# Storing New Environment if Admin
if ($admin) {
$self->{'message'} .= "....Storing new <U>$environment_name</U> <STRONG>ENVIRONMENT NAME</STRONG> in the <U>$self->{'product_name'}</U> <STRONG>PRODUCT</STRONG>...";
$environment->{'name'} = $environment_name;
($environment_id) = Bugzilla::Testopia::Environment->store_environment_name($self->{'name'}, $product_id);
$self->{'message'} .= "DONE.<BR />";
}
}
else {
($environment_id) = $env_id;
$self->{'message'} .= "EXISTS<BR />Importing XML Environment Failed!<BR/>";
}
else {
($environment_id) = $env_id;
$self->{'message'} .= "EXISTS<BR />Importing XML Environment Failed!<BR/>";
$self->{'error'} .= "<U>$environment_name</U> <STRONG>ENVIRONMENT NAME</STRONG> already exists for the <U>$product_name</U> <STRONG>PRODUCT</STRONG>. Please use another name.";
return 0;
}
($self->{'environment_id'}) = $environment_id;
($environment->{'product_id'}) = $self->{'product_id'};
# Parse recursively through the nested child elements.
foreach my $twig_category ($root->children("category")) {
my $category_name = $twig_category->{'att'}->{'name'};
# Makes sure to get the category_id by name and product_id
return 0;
}
($self->{'environment_id'}) = $environment_id;
($environment->{'product_id'}) = $self->{'product_id'};
# Parse recursively through the nested child elements.
foreach my $twig_category ($root->children("category")) {
my $category_name = $twig_category->{'att'}->{'name'};
# Makes sure to get the category_id by name and product_id
my $category = Bugzilla::Testopia::Environment::Category->new({});
my ($cat_id) = $category->check_category($category_name, $product_id);
my $category_id;
@@ -252,24 +252,24 @@ sub parse_child_elements() {
}
$depth++;
my $element_name = $twig_element->{'att'}->{'name'};
# Checking if Elements already exist.
for (my $i = 1; $i < $depth; $i++) {
$self->{'message'} .= "....";
}
$self->{'message'} .= "Checking if <U>$element_name</U> <STRONG>ELEMENT</STRONG> already exists in the <U>$category_name</U> <STRONG>CATEGORY</STRONG>...";
my ($product_id) = $self->{'product_id'};
# Checking if Elements already exist.
for (my $i = 1; $i < $depth; $i++) {
$self->{'message'} .= "....";
}
$self->{'message'} .= "Checking if <U>$element_name</U> <STRONG>ELEMENT</STRONG> already exists in the <U>$category_name</U> <STRONG>CATEGORY</STRONG>...";
my ($product_id) = $self->{'product_id'};
my $element = Bugzilla::Testopia::Environment::Element->new({});
my ($elem_id) = $element->check_element($element_name, $env_category_id);
my $element_id;
if ($elem_id < 1) {
$self->{'message'} .= "<U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U>.<BR />";
my $new_category_elements = $self->{'new_category_elements'};
if ($elem_id < 1) {
$self->{'message'} .= "<U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U>.<BR />";
my $new_category_elements = $self->{'new_category_elements'};
my $new_category_element = {'env_category_id' => $env_category_id, 'category_name' => $category_name, 'element_name' => $element_name};
push (@$new_category_elements, $new_category_element);
$self->{'new_category_elements'} = $new_category_elements;
# Storing New Elements if Admin
if ($admin) {
for (my $i = 1; $i < $depth; $i++) {
for (my $i = 1; $i < $depth; $i++) {
$self->{'message'} .= "....";
}
$self->{'message'} .= "..Storing new <U>$element_name</U> <STRONG>ELEMENT</STRONG> in the <U>$category_name</U> <STRONG>CATEGORY</STRONG>...";
@@ -283,11 +283,11 @@ sub parse_child_elements() {
($element_id) = $element->store();
$self->{'message'} .= "DONE.<BR />";
}
}
else {
}
else {
($element_id) = $elem_id;
$self->{'message'} .= "EXISTS.<BR />";
}
}
($element->{'element_id'}) = $element_id;
($element->{'env_category_id'}) = $env_category_id;
$element->{'name'} = $element_name;
@@ -302,13 +302,13 @@ sub parse_child_elements() {
$self->{'message'} .= "....Checking if <U>$property_name</U> <STRONG>PROPERTY</STRONG> already exists...";
my $property = Bugzilla::Testopia::Environment::Property->new({});
my ($prop_id) = $property->check_property($property_name, $element_id);
my $property_id;
if ($prop_id < 1) {
$self->{'message'} .= "<U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U>.<BR />";
my $new_property_names = $self->{'new_property_names'};
push (@$new_property_names, $property_name);
$self->{'new_property_names'} = $new_property_names;
# Storing New Property if Admin
my $property_id;
if ($prop_id < 1) {
$self->{'message'} .= "<U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U>.<BR />";
my $new_property_names = $self->{'new_property_names'};
push (@$new_property_names, $property_name);
$self->{'new_property_names'} = $new_property_names;
# Storing New Property if Admin
if ($admin) {
for (my $i = 1; $i < $depth; $i++) {
$self->{'message'} .= "....";
@@ -319,30 +319,30 @@ sub parse_child_elements() {
($property_id) = $property->store();
$self->{'message'} .= "DONE.<BR />";
}
}
else {
}
else {
($property_id) = $prop_id;
$self->{'message'} .= "EXISTS.<BR />";
}
$property = Bugzilla::Testopia::Environment::Property->new($property_id);
# Checking if new Selected Value and Valid Expression exist.
my $validexp;
if ($property) {
$validexp = $property->validexp();
}
my $value = $twig_property->field('value');
for (my $i = 1; $i < $depth; $i++) {
}
$property = Bugzilla::Testopia::Environment::Property->new($property_id);
# Checking if new Selected Value and Valid Expression exist.
my $validexp;
if ($property) {
$validexp = $property->validexp();
}
my $value = $twig_property->field('value');
for (my $i = 1; $i < $depth; $i++) {
$self->{'message'} .= "....";
}
$self->{'message'} .= "........Checking if <U>$value</U> <STRONG>VALUE</STRONG> exists in the list of selectable values...";
if ( $validexp !~ m/$value/) {
$self->{'message'} .= "<U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U>.<BR/>";
if ($admin) {
if (!defined($validexp)) {
for (my $i = 1; $i < $depth; $i++) {
$self->{'message'} .= "........Checking if <U>$value</U> <STRONG>VALUE</STRONG> exists in the list of selectable values...";
if ( $validexp !~ m/$value/) {
$self->{'message'} .= "<U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U>.<BR/>";
if ($admin) {
if (!defined($validexp)) {
for (my $i = 1; $i < $depth; $i++) {
$self->{'message'} .= "....";
}
$self->{'message'} .= "..........Setting <U>$value</U> <STRONG>VALID EXPRESSION</STRONG> equal to the <STRONG>VALUE</STRONG> for the first time...";
$self->{'message'} .= "..........Setting <U>$value</U> <STRONG>VALID EXPRESSION</STRONG> equal to the <STRONG>VALUE</STRONG> for the first time...";
$validexp = $value;
}
else {
@@ -354,22 +354,22 @@ sub parse_child_elements() {
}
$property->update_property_validexp($validexp);
$self->{'message'} .= "DONE.<BR/>";
}
else {
}
else {
my $new_validexp_values = $self->{'new_validexp_values'};
my $new_validexp_value = {'property_id' => $property_id, 'property_name' => $property_name, 'value' => $value};
push (@$new_validexp_values, $new_validexp_value);
$self->{'new_validexp_values'} = $new_validexp_values;
}
}
elsif (!defined($validexp)) {
$self->{'message'} .= "<STRONG>VALID EXPRESSION</STRONG> <U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U> YET.<BR/>";
}
else {
}
}
elsif (!defined($validexp)) {
$self->{'message'} .= "<STRONG>VALID EXPRESSION</STRONG> <U><FONT COLOR='RED'><STRONG>DOESN'T EXIST</STRONG></FONT></U> YET.<BR/>";
}
else {
$self->{'message'} .= "EXISTS.<BR/>";
}
if ($property_id && $admin) {
for (my $i = 1; $i < $depth; $i++) {
}
if ($property_id && $admin) {
for (my $i = 1; $i < $depth; $i++) {
$self->{'message'} .= "....";
}
$self->{'message'} .= "............Storing new <STRONG>VALUE SELECTED</STRONG> <U>$value</U>...";
@@ -379,14 +379,14 @@ sub parse_child_elements() {
}
$property->{'value_selected'} = $value;
push (@properties, $property);
}
my $elm_properties = $element->{'properties'};
push (@$elm_properties, @properties);
if ($parent_element) {
my $children = $parent_element->{'children'};
push (@$children, $element);
$parent_element->{'children'} = $children;
}
}
my $elm_properties = $element->{'properties'};
push (@$elm_properties, @properties);
if ($parent_element) {
my $children = $parent_element->{'children'};
push (@$children, $element);
$parent_element->{'children'} = $children;
}
foreach my $twig_element_child ($twig_element->children("element")) {
$self->parse_child_elements($depth, $env_category_id, $category_name, $twig_element_child, $admin, $element);
}

View File

@@ -848,13 +848,13 @@ sub init {
my $type = "anyexact";
if ($cgi->param('caseidtype'))
{
if ($cgi->param('caseidtype') eq 'exclude')
{
$type = "nowords";
}
if ($cgi->param('caseidtype') eq 'exclude')
{
$type = "nowords";
}
else
{
$type = $cgi->param('caseidtype')
$type = $cgi->param('caseidtype')
}
}
if ($obj eq 'run'){
@@ -871,13 +871,13 @@ sub init {
my $type = "anyexact";
if ($cgi->param('runidtype'))
{
if ($cgi->param('runidtype') eq 'exclude')
{
$type = "nowords";
}
if ($cgi->param('runidtype') eq 'exclude')
{
$type = "nowords";
}
else
{
$type = $cgi->param('runidtype')
$type = $cgi->param('runidtype')
}
}
if ($obj eq 'case'){
@@ -891,13 +891,13 @@ sub init {
my $type = "anyexact";
if ($cgi->param('planidtype'))
{
if ($cgi->param('planidtype') eq 'exclude')
{
$type = "nowords";
}
if ($cgi->param('planidtype') eq 'exclude')
{
$type = "nowords";
}
else
{
$type = $cgi->param('planidtype')
$type = $cgi->param('planidtype')
}
}
if ($obj eq 'case'){

View File

@@ -476,9 +476,9 @@ sub lookup_status_by_name {
my ($value) = $dbh->selectrow_array(
"SELECT case_run_status_id
FROM test_case_run_status
WHERE name = ?",
undef, $name);
FROM test_case_run_status
WHERE name = ?",
undef, $name);
return $value;
}

View File

@@ -52,50 +52,50 @@ sub new
$self{IGNORECASE} = $ignorecase;
for my $field ( split(/ /, $fields) )
{
$field = uc $field if ( $self{IGNORECASE} );
$self->{$field} = [];
$field = uc $field if ( $self{IGNORECASE} );
$self->{$field} = [];
}
return $self;
}
sub add
{
my ($self, $type, $object) = @_;
$type = uc $type if ( $self{IGNORECASE} );
my ($self, $type, $object) = @_;
$type = uc $type if ( $self{IGNORECASE} );
return 0 if ( ! exists $self->{$type} );
return 0 if ( ! exists $self->{$type} );
push @{$self->{$type}}, $object;
push @{$self->{$type}}, $object;
}
sub display
{
my ($self) = @_;
print "display() self=" . $self . "\n";
foreach $key (keys %$self)
{
if ( defined $self->{$key} )
{
print "display() key=$key value=" . $self->{$key} . "\n";
}
else
{
print "display() key=$key value=undefined\n";
}
}
my ($self) = @_;
print "display() self=" . $self . "\n";
foreach $key (keys %$self)
{
if ( defined $self->{$key} )
{
print "display() key=$key value=" . $self->{$key} . "\n";
}
else
{
print "display() key=$key value=undefined\n";
}
}
}
sub get
{
my ($self, $type) = @_;
$type = uc $type if ( $self{IGNORECASE} );
return 0 if ( ! exists $self->{$type} );
return $self->{$type};
my ($self, $type) = @_;
$type = uc $type if ( $self{IGNORECASE} );
return 0 if ( ! exists $self->{$type} );
return $self->{$type};
}
1;

View File

@@ -36,18 +36,18 @@ sub _list
foreach (keys(%$query))
{
$cgi->param($_, $$query{$_});
$cgi->param($_, $$query{$_});
}
my $search = Bugzilla::Testopia::Search->new($cgi);
# Result is an array of environment hash maps
return Bugzilla::Testopia::Table->new('environment',
'tr_xmlrpc.cgi',
$cgi,
undef,
$search->query()
)->list();
# Result is an array of environment hash maps
return Bugzilla::Testopia::Table->new('environment',
'tr_xmlrpc.cgi',
$cgi,
undef,
$search->query()
)->list();
}
sub get
@@ -57,20 +57,20 @@ sub get
$self->login;
#Result is a environment hash map
#Result is a environment hash map
my $environment = new Bugzilla::Testopia::Environment($environment_id);
if (not defined $environment)
{
$self->logout;
if (not defined $environment)
{
$self->logout;
die "Environment, " . $environment_id . ", not found";
}
if (not $environment->canview)
{
$self->logout;
}
if (not $environment->canview)
{
$self->logout;
die "User Not Authorized";
}
}
$self->logout;
@@ -84,88 +84,88 @@ sub list
$self->login;
my $list = _list($query);
my $list = _list($query);
$self->logout;
return $list;
return $list;
}
sub create
{
my $self =shift;
my ($new_values) = @_;
my $self =shift;
my ($new_values) = @_;
$self->login;
my $environment = new Bugzilla::Testopia::Environment($new_values);
my $result = $environment->store();
$self->logout;
# Result is new environment id
return $result;
my $environment = new Bugzilla::Testopia::Environment($new_values);
my $result = $environment->store();
$self->logout;
# Result is new environment id
return $result;
}
sub update
{
my $self =shift;
my ($environment_id, $new_values) = @_;
my $self =shift;
my ($environment_id, $new_values) = @_;
$self->login;
my $environment = new Bugzilla::Testopia::Environment($environment_id);
if (not defined $environment)
{
$self->logout;
my $environment = new Bugzilla::Testopia::Environment($environment_id);
if (not defined $environment)
{
$self->logout;
die "Environment, " . $environment_id . ", not found";
}
if (not $environment->canedit)
{
$self->logout;
}
if (not $environment->canedit)
{
$self->logout;
die "User Not Authorized";
}
}
my $result = $environment->update($new_values);
$environment = new Bugzilla::Testopia::Environment($environment_id);
$self->logout;
$environment = new Bugzilla::Testopia::Environment($environment_id);
$self->logout;
# Result is modified environment, otherwise an exception will be thrown
return $environment;
# Result is modified environment, otherwise an exception will be thrown
return $environment;
}
sub get_runs
{
my $self = shift;
my $self = shift;
my ($environment_id) = @_;
$self->login;
my $environment = new Bugzilla::Testopia::Environment($environment_id);
if (not defined $environment)
{
$self->logout;
if (not defined $environment)
{
$self->logout;
die "Environment, " . $environment_id . ", not found";
}
if (not $environment->canview)
{
$self->logout;
}
if (not $environment->canview)
{
$self->logout;
die "User Not Authorized";
}
}
my $result = $environment->runs();
$self->logout;
$self->logout;
# Result is list of test runs for the given environment
return $result;
# Result is list of test runs for the given environment
return $result;
}
1;

View File

@@ -28,6 +28,6 @@
[% PROCESS testopia/export/csv.caseheader.tmpl %]
[% FOREACH test_case = table.list %]
[% PROCESS testopia/export/csv.case.tmpl case=test_case %]
[% PROCESS testopia/export/csv.case.tmpl case=test_case %]
[% END %]

View File

@@ -205,12 +205,12 @@ found.</b>
[% IF table.list_count >0 %]
<div id="buglist_actions">
<div class="links">
<span class="label">Export:</span>
<a href="tr_list_cases.cgi?[% urlquerypart FILTER remove('&viewall=.') FILTER html %]&amp;ctype=csv&amp;viewall=1"><image src="testopia/img/csv.png" class="image"></a>
<img src="https://secure-www.novell.com/img/link_divbar.gif" width="1" height="20" alt="line" class="bar">
<a href="tr_list_cases.cgi?[% urlquerypart FILTER remove('&viewall=.') FILTER html %]&amp;ctype=xml&amp;viewall=1"><image src="testopia/img/xml.png" class="image"></a>
</div>
<div class="links">
<span class="label">Export:</span>
<a href="tr_list_cases.cgi?[% urlquerypart FILTER remove('&viewall=.') FILTER html %]&amp;ctype=csv&amp;viewall=1"><img src="testopia/img/csv.png" class="image"></a>
<img src="https://secure-www.novell.com/img/link_divbar.gif" width="1" height="20" alt="line" class="bar">
<a href="tr_list_cases.cgi?[% urlquerypart FILTER remove('&viewall=.') FILTER html %]&amp;ctype=xml&amp;viewall=1"><img src="testopia/img/xml.png" class="image"></a>
</div>
</div>
[% END %]

View File

@@ -23,7 +23,7 @@
[% PROCESS testopia/export/xml.header.tmpl -%]
[% FOREACH test_case = table.list %]
[%+ PROCESS testopia/export/xml.case.tmpl case=test_case %]
[%+ PROCESS testopia/export/xml.case.tmpl case=test_case %]
[% END %]
[%- PROCESS testopia/export/xml.footer.tmpl %]

View File

@@ -306,12 +306,12 @@
</FORM>
<div id="buglist_actions">
<div class="links">
<span class="label">Export:</span>
<a href="tr_show_case.cgi?&amp;case_id=[% case.id FILTER none %]&amp;ctype=csv"><image src="testopia/img/csv.png" class="image"></a>
|
<a href="tr_show_case.cgi?&amp;case_id=[% case.id FILTER none %]&amp;ctype=xml"><image src="testopia/img/xml.png" class="image"></a>
</div>
<div class="links">
<span class="label">Export:</span>
<a href="tr_show_case.cgi?&amp;case_id=[% case.id FILTER none %]&amp;ctype=csv"><image src="testopia/img/csv.png" class="image"></a>
|
<a href="tr_show_case.cgi?&amp;case_id=[% case.id FILTER none %]&amp;ctype=xml"><image src="testopia/img/xml.png" class="image"></a>
</div>
</div>
[%##### Footer #####%]

View File

@@ -21,6 +21,6 @@
[%# Testopia Show Test Case XML export template #%]
[% PROCESS testopia/export/xml.header.tmpl %]
[%+ PROCESS testopia/export/xml.case.tmpl %]
[%+ PROCESS testopia/export/xml.case.tmpl %]
[% PROCESS testopia/export/xml.footer.tmpl %]

View File

@@ -32,7 +32,7 @@
<b>Action:</b><br/>[% caserun.case.text.action %]
</div>
</td>
<td style="width:10px";/>
<td style="width:10px;"/>
<td valign="top" align="left" width="50%" class="ae_s">
<div style="overflow:auto">
<b>Expected Results:</b><br/>[% caserun.case.text.effect %]
@@ -128,8 +128,7 @@
[%##### Assignee #####%]
<div class="cc_i"><input value="[% user.login FILTER html %]" id="assignee_[% index %]" /><input type="button" value="Assign" onclick="chNote([% index %], [% caserun.id FILTER none %], document.getElementById('notes[% index %]').value); chOwn([% index %], [% caserun.id FILTER none %], document.getElementById('assignee_[% index %]').value)">
<a href="javascript:userLookup('document.Create.assigned_to', document.Create.assigned_to.value);">
<image src="images/users.png" border="0" alt="Lookup User" title="Lookup User"></a>
<a id="aw_[% index %]" href="javascript:aws([% index %], [% caserun.id FILTER none %])">
<img src="images/users.png" border="0" alt="Lookup User" title="Lookup User"></a>
</div>
<div style="float:right; margin-right:20px;">
<a href="tr_show_caserun.cgi?caserun_id=[% caserun.id FILTER none %]">Classic interface...</a>

View File

@@ -16,7 +16,7 @@
# Maciej Maczynski. All Rights Reserved.
#
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
# Michael Hight <mjhight@gmail.com>
# Michael Hight <mjhight@gmail.com>
#%]
[%# INTERFACE:
@@ -30,11 +30,11 @@
<th class="bz_row_header" align="right">Parent Product:</th>
<td>
<select name="product" id="product">
<option value="[% currentproduct.id %]">[% currentproduct.name %]
[% FOREACH p = products %]
[% IF currentproduct.id != p.id %]
<option value="[% p.id %]">[% p.name %]
[% END %]
<option value="[% currentproduct.id %]">[% currentproduct.name %]
[% FOREACH p = products %]
[% IF currentproduct.id != p.id %]
<option value="[% p.id %]">[% p.name %]
[% END %]
[% END %]
</select>
</td>

View File

@@ -16,8 +16,8 @@
# Maciej Maczynski. All Rights Reserved.
#
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
# Brian Kramer <bkramer@student.neumont.edu>
# Michael Hight <mjhight@gmail.com>
# Brian Kramer <bkramer@student.neumont.edu>
# Michael Hight <mjhight@gmail.com>
#%]
[%# INTERFACE:
@@ -28,94 +28,94 @@
<h3>Element Administration</h3>
<table>
<tr>
<th class="bz_row_header" align="left" width="50">Change Element Parent</th>
</tr>
<tr>
<td>
<table>
<tr>
<th class="bz_row_header" align="left" width="100">Product</th>
<td>
<label for="product_id" accesskey="p"></label>
<tr>
<th class="bz_row_header" align="left" width="50">Change Element Parent</th>
</tr>
<tr>
<td>
<table>
<tr>
<th class="bz_row_header" align="left" width="100">Product</th>
<td>
<label for="product_id" accesskey="p"></label>
[%### Product ###################################################################################### %]
<select name="productCombo" id="productCombo" onChange="getCategories(this); ">
<option value="[% currentproduct.id %]">[% currentproduct.name %]
[% FOREACH product = products %]
[% IF currentproduct.id != product.id %]
<option value="[% product.id %]" >[% product.name %]
[% END %]
[% END %]
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<th class="bz_row_header" align="left" width="100">Category</th>
<td>
<select name="productCombo" id="productCombo" onChange="getCategories(this); ">
<option value="[% currentproduct.id %]">[% currentproduct.name %]
[% FOREACH product = products %]
[% IF currentproduct.id != product.id %]
<option value="[% product.id %]" >[% product.name %]
[% END %]
[% END %]
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<th class="bz_row_header" align="left" width="100">Category</th>
<td>
[%### Category ###################################################################################### %]
<select name="categoryCombo" id="categoryCombo" onChange="getElements(this)">
<option value="[% currentcategory.env_category_id %]" >[% currentcategory.name %]
[% FOREACH category = categories %]
[% IF currentcategory.env_category_id != category.name %]
<option value="[% category.id %]" >[% category.name %]
[% END %]
[% END %]
</select>
</td>
</tr>
</table>
</td>
</tr>
<select name="categoryCombo" id="categoryCombo" onChange="getElements(this)">
<option value="[% currentcategory.env_category_id %]" >[% currentcategory.name %]
[% FOREACH category = categories %]
[% IF currentcategory.env_category_id != category.name %]
<option value="[% category.id %]" >[% category.name %]
[% END %]
[% END %]
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<th class="bz_row_header" align="left" width="100">Parent</th>
<td>
<td>
<table>
<tr>
<th class="bz_row_header" align="left" width="100">Parent</th>
<td>
[%### Element ###################################################################################### %]
<select name="elementCombo" id="elementCombo";">
[% IF element.parent_id == 0 %]
<option value="0">[none]
[% FOREACH e = elements %]
<option value="[% e.id %]">[% e.name %]
[% END %]
[% ELSE %]
<option value="[% currentelement.id %]">[% currentelement.name %]
<option value="0">[none]
[% FOREACH e = elements %]
[% IF currentelement.id != e.id%]
<option value="[% e.id %]">[% e.name %]
[% END %]
[% END %]
[% END %]
</select>
</td>
</tr>
</table>
<br/>
</td>
</tr>
<tr>
<th class="bz_row_header" align="left" width="100">Element Name</th>
</tr>
<tr>
<td>
<table>
<tr>
<th class="bz_row_header" align="left">Name:</th>
<td><input name="name" id="name" value="[% element.name %]" size="30" /></td>
</tr>
</table>
</td>
</tr>
<select name="elementCombo" id="elementCombo";">
[% IF element.parent_id == 0 %]
<option value="0">[none]
[% FOREACH e = elements %]
<option value="[% e.id %]">[% e.name %]
[% END %]
[% ELSE %]
<option value="[% currentelement.id %]">[% currentelement.name %]
<option value="0">[none]
[% FOREACH e = elements %]
[% IF currentelement.id != e.id%]
<option value="[% e.id %]">[% e.name %]
[% END %]
[% END %]
[% END %]
</select>
</td>
</tr>
</table>
<br/>
</td>
</tr>
<tr>
<th class="bz_row_header" align="left" width="100">Element Name</th>
</tr>
<tr>
<td>
<table>
<tr>
<th class="bz_row_header" align="left">Name:</th>
<td><input name="name" id="name" value="[% element.name %]" size="30" /></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<input name="submit" id="element_submit" type="submit" value="Submit" >

View File

@@ -16,8 +16,8 @@
# Maciej Maczynski. All Rights Reserved.
#
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
# Michael Hight <mjhight@gmail.com>
# Scott Sudweeks <ssudweeks@novell.com>
# Michael Hight <mjhight@gmail.com>
# Scott Sudweeks <ssudweeks@novell.com>
#%]
[%# INTERFACE:
@@ -28,21 +28,21 @@
<h3>Property Administration</h3>
<table border="0">
<tr>
<th class="bz_row_header" align="right">Assiged to Element:</th>
<td>
<select name="element" id="element">
<option value="[% currentelement.id %]" >[% currentelement.name %]
[% FOREACH e = elements %]
[% IF e.id != currentelement.id %]
<option value="[% e.id %]">[% e.name %]
[% END %]
[% END %]
</select>
</td>
<th class="bz_row_header" align="right">Assiged to Element:</th>
<td>
<select name="element" id="element">
<option value="[% currentelement.id %]" >[% currentelement.name %]
[% FOREACH e = elements %]
[% IF e.id != currentelement.id %]
<option value="[% e.id %]">[% e.name %]
[% END %]
[% END %]
</select>
</td>
</tr>
<th class="bz_row_header" align="right">Property Name:</th>
<td><input name="name" id="name" value="[% property.name %]" size="30" /></td>
<td><input name="name" id="name" value="[% property.name %]" size="30" /></td>
</tr>
</table>

View File

@@ -16,8 +16,8 @@
# Maciej Maczynski. All Rights Reserved.
#
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
# Michael Hight <mjhight@gmail.com>
# Scott Sudweeks <ssudweeks@novell.com>
# Michael Hight <mjhight@gmail.com>
# Scott Sudweeks <ssudweeks@novell.com>
#%]
[%# INTERFACE:
@@ -32,33 +32,33 @@
<table border="0">
<tr>
<th class="bz_row_header" align="center">Values For:<br><img src="testopia/img/triangle.gif"/ align="bottom"> <span style="color:#C00" >[% property.name %]</span></th>
<th class="bz_row_header" align="center">Values For:<br><img src="testopia/img/triangle.gif"/ align="bottom"> <span style="color:#C00" >[% property.name %]</span></th>
</tr>
<tr>
<td>
<select
size="10"
style="width:150px"
name="valid_exp"
id="valid_exp"
onchange="selected_expression_change(this);">
[% FOREACH e = expressions %]
<option value="[% e %]">[% e %]
[% END %]
</select>
</td>
<td>
<input type="button" onclick="moveUp();" value="/\" />
<br>
<input type="button" onclick="moveDown();" value="\/" />
</td>
<td>
<select
size="10"
style="width:150px"
name="valid_exp"
id="valid_exp"
onchange="selected_expression_change(this);">
[% FOREACH e = expressions %]
<option value="[% e %]">[% e %]
[% END %]
</select>
</td>
<td>
<input type="button" onclick="moveUp();" value="/\" />
<br>
<input type="button" onclick="moveDown();" value="\/" />
</td>
</tr>
<td>
Value: <input type="text" name="text_exp_value" id="text_exp_value" />
</td>
<td>
<input type="button" value="change" id="" onclick="update_text();"/>
</td>
<td>
Value: <input type="text" name="text_exp_value" id="text_exp_value" />
</td>
<td>
<input type="button" value="change" id="" onclick="update_text();"/>
</td>
</tr>
</table>

View File

@@ -40,18 +40,18 @@
[% PROCESS testopia/messages.html.tmpl %]
[% IF action == "admin" %]
<form action="tr_import_environment.cgi?action=admin" method="post">
<h3><font color="red">Add the above new data?</font></h3>
<input type="hidden" name="action" value="admin" />
<input type="hidden" name="xml" value="[%- xml %]" />
<input type="submit" name="submit" value="Add Now" /> <input type="submit" name="submit" value="Cancel" />
</form>
<form action="tr_import_environment.cgi?action=admin" method="post">
<h3><font color="red">Add the above new data?</font></h3>
<input type="hidden" name="action" value="admin" />
<input type="hidden" name="xml" value="[%- xml %]" />
<input type="submit" name="submit" value="Add Now" /> <input type="submit" name="submit" value="Cancel" />
</form>
[% ELSE %]
<form action="tr_import_environment.cgi?action=import" enctype="multipart/form-data" method="post">
<p>Upload XML Environment: <input type="file" name="env_file" size="40" /></p>
<input type="hidden" name="action" value="import" />
<p><input type="submit" value="Import" /></p>
</form>
<form action="tr_import_environment.cgi?action=import" enctype="multipart/form-data" method="post">
<p>Upload XML Environment: <input type="file" name="env_file" size="40" /></p>
<input type="hidden" name="action" value="import" />
<p><input type="submit" value="Import" /></p>
</form>
[% END %]
[% PROCESS global/footer.html.tmpl %]

View File

@@ -26,62 +26,62 @@
[% colsepchar = user.settings.csv_colsepchar.value %]
[% FOREACH column = displaycolumns %]
[% SWITCH column %]
[% CASE 'action' %]
[% case.text.action FILTER csv %]
[% CASE 'author_id' %]
[% case.author.email FILTER csv %]
[% CASE 'blocks' %]
[% case.blocked_list FILTER csv %]
[% CASE 'break_down' %]
[% case.text.breakdown FILTER csv %]
[% CASE 'case_status_id' %]
[% case.status FILTER csv %]
[% CASE 'category_id' %]
[% case.category.name FILTER csv %]
[% CASE 'components' %]
[% FILTER csv %]
[% FOREACH component = case.components %]
[% component.name %](product=[% component.product_name %])
[% IF component != case.components.last %]
[% colsepchar %]
[% END %]
[% END %]
[% END %]
[% CASE 'default_tester_id' %]
[% case.default_tester.email FILTER csv %]
[% CASE 'depends_on' %]
[% case.dependson_list FILTER csv %]
[% CASE 'expected_results' %]
[% case.text.effect FILTER csv %]
[% CASE 'isautomated' %]
[% case.isautomated ? "YES" : "NO" FILTER csv %]
[% CASE 'plans' %]
[% FILTER csv %]
[% FOREACH plan = case.plans %]
[% plan.id %]
[% IF plan != case.plans.last %]
[% colsepchar %]
[% END %]
[% END %]
[% END %]
[% CASE 'priority_id' %]
[% case.priority FILTER csv %]
[% CASE 'set_up' %]
[% case.text.setup FILTER csv %]
[% CASE 'tags' %]
[% FILTER csv %]
[% FOREACH tag = case.tags %]
[% tag.name %]
[% IF tag != case.tags.last %]
[% colsepchar %]
[% END %]
[% END %]
[% END %]
[% CASE DEFAULT %]
[% case.$column FILTER csv %]
[% END %]
[% IF column != displaycolumns.last %]
[% colsepchar %]
[% END %]
[% SWITCH column %]
[% CASE 'action' %]
[% case.text.action FILTER csv %]
[% CASE 'author_id' %]
[% case.author.email FILTER csv %]
[% CASE 'blocks' %]
[% case.blocked_list FILTER csv %]
[% CASE 'break_down' %]
[% case.text.breakdown FILTER csv %]
[% CASE 'case_status_id' %]
[% case.status FILTER csv %]
[% CASE 'category_id' %]
[% case.category.name FILTER csv %]
[% CASE 'components' %]
[% FILTER csv %]
[% FOREACH component = case.components %]
[% component.name %](product=[% component.product_name %])
[% IF component != case.components.last %]
[% colsepchar %]
[% END %]
[% END %]
[% END %]
[% CASE 'default_tester_id' %]
[% case.default_tester.email FILTER csv %]
[% CASE 'depends_on' %]
[% case.dependson_list FILTER csv %]
[% CASE 'expected_results' %]
[% case.text.effect FILTER csv %]
[% CASE 'isautomated' %]
[% case.isautomated ? "YES" : "NO" FILTER csv %]
[% CASE 'plans' %]
[% FILTER csv %]
[% FOREACH plan = case.plans %]
[% plan.id %]
[% IF plan != case.plans.last %]
[% colsepchar %]
[% END %]
[% END %]
[% END %]
[% CASE 'priority_id' %]
[% case.priority FILTER csv %]
[% CASE 'set_up' %]
[% case.text.setup FILTER csv %]
[% CASE 'tags' %]
[% FILTER csv %]
[% FOREACH tag = case.tags %]
[% tag.name %]
[% IF tag != case.tags.last %]
[% colsepchar %]
[% END %]
[% END %]
[% END %]
[% CASE DEFAULT %]
[% case.$column FILTER csv %]
[% END %]
[% IF column != displaycolumns.last %]
[% colsepchar %]
[% END %]
[% END %]

View File

@@ -26,12 +26,12 @@
[% colsepchar = user.settings.csv_colsepchar.value %]
[% FOREACH column = displaycolumns %]
[% IF column == 'case_id' %]
[% column FILTER csv %]
[% ELSE %]
[% column FILTER remove('_id') FILTER csv %]
[% END %]
[% IF column != displaycolumns.last %]
[% colsepchar %]
[% END %]
[% IF column == 'case_id' %]
[% column FILTER csv %]
[% ELSE %]
[% column FILTER remove('_id') FILTER csv %]
[% END %]
[% IF column != displaycolumns.last %]
[% colsepchar %]
[% END %]
[% END %]

View File

@@ -28,6 +28,6 @@
[% PROCESS testopia/export/csv.caseheader.tmpl %]
[% FOREACH test_case = case_table.list %]
[% PROCESS testopia/export/csv.case.tmpl case=test_case %]
[% PROCESS testopia/export/csv.case.tmpl case=test_case %]
[% END %]

View File

@@ -283,14 +283,14 @@
[% IF case_table.list_count >0 %]
<div id="buglist_actions">
<div class="links">
[% IF case_table.list_count >0 %]
<span class="label">Export Test Cases:</span>
<a href="tr_show_plan.cgi?&amp;plan_id=[% plan.id FILTER none %]&amp;export=testcases&amp;ctype=csv&amp;viewall=1"><image src="testopia/img/csv.png" class="image"></a>
|
<a href="tr_show_plan.cgi?&amp;plan_id=[% plan.id FILTER none %]&amp;export=testcases&amp;ctype=xml&amp;viewall=1"><image src="testopia/img/xml.png" class="image"></a>
[% END %]
</div>
<div class="links">
[% IF case_table.list_count >0 %]
<span class="label">Export Test Cases:</span>
<a href="tr_show_plan.cgi?&amp;plan_id=[% plan.id FILTER none %]&amp;export=testcases&amp;ctype=csv&amp;viewall=1"><img src="testopia/img/csv.png" class="image"></a>
|
<a href="tr_show_plan.cgi?&amp;plan_id=[% plan.id FILTER none %]&amp;export=testcases&amp;ctype=xml&amp;viewall=1"><img src="testopia/img/xml.png" class="image"></a>
[% END %]
</div>
</div>
[% END %]

View File

@@ -25,7 +25,7 @@
[% PROCESS testopia/export/xml.header.tmpl -%]
[% FOREACH test_case = case_table.list %]
[%+ PROCESS testopia/export/xml.case.tmpl case=test_case %]
[%+ PROCESS testopia/export/xml.case.tmpl case=test_case %]
[% END %]
[%- PROCESS testopia/export/xml.footer.tmpl %]

View File

@@ -90,7 +90,7 @@ found.
</td>
<td align="right"><b>Environment<b></td>
<td><input name="environment" id="environment" value="--Do Not Change--" />
<a href="tr_query.cgi?current_tab=environment" target="blank"><img src="testopia/img/env_lookup.png" align="middle"></a>
<a href="tr_query.cgi?current_tab=environment" target="blank"><img src="testopia/img/env_lookup.png" align="middle"></a>
</td>
[% IF NOT multiprod %]

View File

@@ -96,8 +96,8 @@ function sx_done () {
if (s.substring(0,2)=='OK') {
s = s.substring(3);
updateStatus(list_id, _newStatus);
_newStatus = null;
updateStatus(list_id, _newStatus);
_newStatus = null;
displayMsg('floatMsg', 1, MSG_TEST_CASE_STATUS_UPDATED);
setTimeout("clearMsg('floatMsg')",OK_TIMEOUT);
@@ -164,20 +164,20 @@ function ss_done () {
if (s.substring(0,2)=='OK') {
if(_inOrder){
if (_order == 'up') {
for(var i=0; i<list_index.length; i++) {
moveup(list_index[i]);
}
} else if (_order == 'down') {
if (_order == 'up') {
for(var i=0; i<list_index.length; i++) {
moveup(list_index[i]);
}
} else if (_order == 'down') {
//reversed order:
for(var i=list_index.length-1; i>-1; i--) {
movedown(list_index[i]);
}
}
}
_order = null;
displayMsg('floatMsg', 1, MSG_TEST_CASE_ORDER_UPDATED);
_order = null;
displayMsg('floatMsg', 1, MSG_TEST_CASE_ORDER_UPDATED);
setTimeout("clearMsg('floatMsg')",OK_TIMEOUT);
} else {
//I give up refreshing the list dinamically, let the server do it:

View File

@@ -40,8 +40,8 @@ function _cset(newstate) {
var myform = document.getElementById('table');
for(i=0;i<myform.length;i++) {
if(myform[i].type == 'checkbox' && myform[i].name != 'togglearch'){
myform[i].checked = newstate;
}
myform[i].checked = newstate;
}
}
//st();
}
@@ -165,26 +165,26 @@ function createHttpReq () {
function clearMsg(id) {
var o = document.getElementById(id);
o.style.display="none";
var o = document.getElementById(id);
o.style.display="none";
}
function displayMsg(id, type, text) {
var o = document.getElementById(id);
switch(type) {
case 1:
o.style.background='green';
o.style.color='white';
break;
case 2:
o.style.background='red';
o.style.color='white';
break;
case 3:
o.style.background='#FFDD66';
o.style.color='black';
break;
var o = document.getElementById(id);
switch(type) {
case 1:
o.style.background='green';
o.style.color='white';
break;
case 2:
o.style.background='red';
o.style.color='white';
break;
case 3:
o.style.background='#FFDD66';
o.style.color='black';
break;
}
o.innerHTML = text;
o.style.display = 'inline';

View File

@@ -10,38 +10,38 @@ Many thanks to Sytze.
These are his notes:
* GeneralScripts, the scripts that are used on the test machine:
* GeneralScripts, the scripts that are used on the test machine:
* create_testscript.sh ; this will call for the action added to
tr_scripts.cgi and store the created test script as "testscript.sh".
* pass_id.sh; this will pass the specified run_case
* fail_id.sh; this will fail the specified run_case
* note_id.sh; this will put a note to the specified run_case
* trenv.sh; this contains the name of the server, the username and
password for the user that runs the test.
* create_testscript.sh ; this will call for the action added to
tr_scripts.cgi and store the created test script as "testscript.sh".
* pass_id.sh; this will pass the specified run_case
* fail_id.sh; this will fail the specified run_case
* note_id.sh; this will put a note to the specified run_case
* trenv.sh; this contains the name of the server, the username and
password for the user that runs the test.
* RegressionTest; this contains an example regression test script:
* RegressionTest; this contains an example regression test script:
* regression_test.sh: It will call create_testscript.sh for a specified
plan_id with a generated summary and subsequently call the generated test
script.
* regression_test.sh: It will call create_testscript.sh for a specified
plan_id with a generated summary and subsequently call the generated test
script.
There are some things that should be added/changed:
* I did have wget available, but the version that we have installed does not
* I did have wget available, but the version that we have installed does not
support post. This implies that I can currently only put a single line as note.
I have asked our system administrator to install curl, so that I can use a post
method to store the log of a testscript as notes for the run case.
* Actually only those thest cases that are marked as "automated" should be
* Actually only those thest cases that are marked as "automated" should be
put in the generated test script.
* I currently have mutliple unix users on different machines that perform the
* I currently have mutliple unix users on different machines that perform the
regression tests. At the moment I create a new run for general user testopia,
perhaps I should change that to have a single run with multiple users, but then
I need to have an additional cgi-script to get the script for a specific user

View File

@@ -157,7 +157,7 @@ elsif ($action eq 'getcategories'){
my $ret;
foreach my $c (@{$categories}){
$c->name =~ s/<span style='color:blue'>|<\/span>//g;
$ret .= $c->id.'||'.$c->name.'|||';
$ret .= $c->id.'||'.$c->name.'|||';
}
chop($ret);
print $ret;
@@ -172,14 +172,14 @@ elsif ($action eq 'getelements'){
foreach my $e (@{$elements}){
my $elem = Bugzilla::Testopia::Environment::Element->new(@$e{'element_id'});
$elem->{'name'} =~ s/<span style='color:blue'>|<\/span>//g;
$ret .= $elem->{'element_id'}.'||'.$elem->{'name'}.'|||';
$ret .= $elem->{'element_id'}.'||'.$elem->{'name'}.'|||';
}
$ret = substr($ret, 0, length($ret) - 3);
print $ret;
}
elsif ($action eq 'getproperties'){
my $env = Bugzilla::Testopia::Environment->new({});
my $env = Bugzilla::Testopia::Environment->new({});
my $elem_id = $cgi->param('elem_id');
@@ -189,7 +189,7 @@ elsif ($action eq 'getproperties'){
my $ret;
foreach my $p (@{$properties}){
@$p[1] =~ s/<span style='color:blue'>|<\/span>//g;
$ret .= @$p[0].'||'.@$p[1].'|||';
$ret .= @$p[0].'||'.@$p[1].'|||';
}
chop($ret);
print $ret;

View File

@@ -190,7 +190,6 @@ sub get_builds_xml {
$ret .= "</build>";
}
$ret .= "</items>";
print STDERR "$ret";
return $ret;
}

View File

@@ -177,7 +177,6 @@ sub get_categories_xml {
$ret .= "</category>";
}
$ret .= "</items>";
print STDERR "$ret";
return $ret;
}

View File

@@ -71,7 +71,7 @@ $CGI::POST_MAX = 1024 * 500; # max file size 500K
print $cgi->header;
# Make sure the file isn't too big.
if (!$env_filename && $cgi->cgi_error()) {
$vars->{'tr_error'} .= "File size cannot exceed 500K.<BR/>";
$vars->{'tr_error'} .= "File size cannot exceed 500K.<BR/>";
}
# Upload the file and read it into a string if it's been posted.
if ($action eq 'import' && $env_filename) {
@@ -169,8 +169,8 @@ new data.
=cut
sub admin_approve {
$vars->{'action'} = "admin";
$vars->{'xml'} = $xml;
$vars->{'action'} = "admin";
$vars->{'xml'} = $xml;
}
@@ -183,7 +183,7 @@ Stores the Environment based on existing Categories, Elements, Properties, and s
=cut
sub store_environment {
$environment->store();
$environment->store();
}
@@ -199,22 +199,22 @@ sub slurp_env_file {
my $untainted_filename;
my $post_max = $CGI::POST_MAX;
if (!$env_filename) {
$vars->{'tr_error'} .= "Please upload an Environment XML file.<BR/>";
return 0;
}
# untaint $env_file
if ($env_filename =~ /^([-\@:\/\\\w.]+)$/) {
$untainted_filename = $1;
}
else {
$vars->{'tr_error'} .= "The filename must contain numbers and letters only. Please try again.<BR/>";
return 0;
}
if ($untainted_filename =~ m/\.\./) {
$vars->{'tr_error'} .= "The filename cannot conain the sequence '..' Please try again.<BR/>";
return 0;
}
my $num_bytes = $CGI::POST_MAX;
$vars->{'tr_error'} .= "Please upload an Environment XML file.<BR/>";
return 0;
}
# untaint $env_file
if ($env_filename =~ /^([-\@:\/\\\w.]+)$/) {
$untainted_filename = $1;
}
else {
$vars->{'tr_error'} .= "The filename must contain numbers and letters only. Please try again.<BR/>";
return 0;
}
if ($untainted_filename =~ m/\.\./) {
$vars->{'tr_error'} .= "The filename cannot conain the sequence '..' Please try again.<BR/>";
return 0;
}
my $num_bytes = $CGI::POST_MAX;
my ($totalbytes, $byteswritten, $buffer);
while ($byteswritten = read($env_fh, $buffer, $num_bytes)) {
$xml .= $buffer;
@@ -342,6 +342,6 @@ Displays the Import Environment template
=cut
sub display {
$vars->{'tr_message'} .= $message . $environment->{'message'};
$template->process("testopia/environment/import.xml.tmpl", $vars) || print $template->error();
$vars->{'tr_message'} .= $message . $environment->{'message'};
$template->process("testopia/environment/import.xml.tmpl", $vars) || print $template->error();
}

View File

@@ -49,22 +49,22 @@ if ($action eq 'Add'){
my $name = $cgi->param('name');
my $product = $cgi->param('product');
trick_taint($name);
detaint_natural($product);
my $env = Bugzilla::Testopia::Environment->new({'environment_id' => 0});
my $success = $env->store_environment_name($name, $product);
unless ($success){
$vars->{'tr_error'} = "The environment name '$name' is already taken.";
$vars->{'environment'} = $env;
$template->process("testopia/environment/add.html.tmpl", $vars)
|| print $template->error();
exit;
}
$vars->{'tr_message'} = "The environment '$name' was successfully added.";
$env = Bugzilla::Testopia::Environment->new($success);
trick_taint($name);
detaint_natural($product);
my $env = Bugzilla::Testopia::Environment->new({'environment_id' => 0});
my $success = $env->store_environment_name($name, $product);
unless ($success){
$vars->{'tr_error'} = "The environment name '$name' is already taken.";
$vars->{'environment'} = $env;
$template->process("testopia/environment/add.html.tmpl", $vars)
|| print $template->error();
exit;
}
$vars->{'tr_message'} = "The environment '$name' was successfully added.";
$env = Bugzilla::Testopia::Environment->new($success);
my $category = Bugzilla::Testopia::Environment::Category->new({'id' => 0});
if (Param('useclassification')){
$vars->{'allhaschild'} = $category->get_all_child_count;
@@ -80,7 +80,7 @@ if ($action eq 'Add'){
$vars->{'environment'} = $env;
$template->process("testopia/environment/show.html.tmpl", $vars)
|| print $template->error();
}
else {

View File

@@ -115,7 +115,6 @@ elsif ($action eq 'edit'){
elsif ($action eq 'getChildren'){
my $json = new JSON;
print STDERR $cgi->param('data');
my $data = $json->jsonToObj($cgi->param('data'));
my $node = $data->{'node'};