Bug 224208 Add a higher level of categorization (.ie departments, locations, etc.)

patch by Albert Ting
r=joel, glob
a=myk


git-svn-id: svn://10.0.0.236/trunk@161078 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bugreport%peshkin.net
2004-08-20 21:49:20 +00:00
parent ba07da6cf7
commit 967204e8ec
38 changed files with 1607 additions and 103 deletions

View File

@@ -127,7 +127,7 @@ sub PrefillForm {
# Nothing must be undef, otherwise the template complains.
foreach my $name ("bug_status", "resolution", "assigned_to",
"rep_platform", "priority", "bug_severity",
"product", "reporter", "op_sys",
"classification", "product", "reporter", "op_sys",
"component", "version", "chfield", "chfieldfrom",
"chfieldto", "chfieldvalue", "target_milestone",
"email", "emailtype", "emailreporter",
@@ -274,9 +274,24 @@ for (my $i = 0; $i < @products; ++$i) {
# Assign hash back to product array.
$products[$i] = \%product;
}
$vars->{'product'} = \@products;
# Create data structures representing each classification
if (Param('useclassification')) {
my @classifications = ();
foreach my $c (sort(GetSelectableClassifications())) {
# Create hash to hold attributes for each classification.
my %classification = (
'name' => $c,
'products' => [ GetSelectableProducts(0,$c) ]
);
# Assign hash back to classification array.
push @classifications, \%classification;
}
$vars->{'classification'} = \@classifications;
}
# We use 'component_' because 'component' is a Template Toolkit reserved word.
$vars->{'component_'} = \@components;
@@ -300,7 +315,9 @@ push @chfields, "[Bug creation]";
# This is what happens when you have variables whose definition depends
# on the DB schema, and then the underlying schema changes...
foreach my $val (@::log_columns) {
if ($val eq 'product_id') {
if ($val eq 'classification_id') {
$val = 'classification';
} elsif ($val eq 'product_id') {
$val = 'product';
} elsif ($val eq 'component_id') {
$val = 'component';