can't add tags from "My Cases"

git-svn-id: svn://10.0.0.236/trunk@248800 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ghendricks%novell.com 2008-03-28 21:56:33 +00:00
parent 2903d15eee
commit 7f35993f73
2 changed files with 14 additions and 3 deletions

View File

@ -78,7 +78,7 @@ sub _check_product {
}
sub _check_name {
my ($invocant, $name, $product_id) = @_;
my ($invocant, $name, $product) = @_;
$name = clean_text($name) if $name;
if (!defined $name || $name eq '') {
@ -88,7 +88,7 @@ sub _check_name {
trick_taint($name);
# Check that we don't already have a build with that name in this product.
my $orig_id = check_case_category($name, $product_id);
my $orig_id = check_case_category($name, $product);
my $notunique;
if (ref $invocant){
@ -112,7 +112,7 @@ sub _check_name {
sub set_description { $_[0]->set('description', $_[1]); }
sub set_name {
my ($self, $value) = @_;
$value = $self->_check_name($value, $self->product_id);
$value = $self->_check_name($value, $self->product);
$self->set('name', $value);
}
@ -224,6 +224,15 @@ sub product_id { return $_[0]->{'product_id'}; }
sub name { return $_[0]->{'name'}; }
sub description { return $_[0]->{'description'}; }
sub product {
my ($self) = @_;
return $self->{'product'} if exists $self->{'product'};
$self->{'product'} = Bugzilla::Testopia::Product->new($self->product_id);
return $self->{'product'};
}
sub case_count {
my ($self) = @_;
my $dbh = Bugzilla->dbh;

View File

@ -28,6 +28,8 @@
[% PROCESS testopia/style.none.tmpl %]
[% javascript_urls.push("testopia/js/case.js") %]
[% javascript_urls.push("testopia/js/tags.js") %]
[% javascript_urls.push("testopia/js/caserun.js") %]
[% PROCESS global/header.html.tmpl %]