Commit 8c3f0e1a authored by travis%sedsystems.ca's avatar travis%sedsystems.ca

Bug 99567 : Allow Milestone to be set on creation of bug as an option

Patch by Todd Stansell <tjs@tellme.com> r=kiko,justdave a=justdave
parent 64757778
......@@ -888,6 +888,15 @@ You will get this message once a day until you\'ve dealt with these bugs!
},
{
name => 'letsubmitterchoosemilestone',
desc => 'If this is on, then people submitting bugs can choose the ' .
'Target Milestone for that bug. If off, then all bugs initially ' .
'have the default milestone for the product being filed in.',
type => 'b',
default => 1
},
{
name => 'musthavemilestoneonaccept',
desc => 'If you are using Target Milestone, do you want to require that ' .
'the milestone be set in order for a user to ACCEPT a bug?',
......
......@@ -53,6 +53,7 @@ use vars qw(
@legal_keywords
$userid
%versions
%target_milestone
$proddesc
$classdesc
);
......@@ -437,6 +438,19 @@ if ( ($cloned_bug_id) &&
$default{'version'} = $vars->{'version'}->[$#{$vars->{'version'}}];
}
# Get list of milestones.
if ( Param('usetargetmilestone') ) {
$vars->{'target_milestone'} = $::target_milestone{$product};
if (formvalue('target_milestone')) {
$default{'target_milestone'} = formvalue('target_milestone');
} else {
SendSQL("SELECT defaultmilestone FROM products WHERE " .
"name = " . SqlQuote($product));
$default{'target_milestone'} = FetchOneColumn();
}
}
# List of status values for drop-down.
my @status;
......
......@@ -159,6 +159,14 @@ function set_assign_to() {
[% INCLUDE select %]
</tr>
[% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %]
<tr>
[% sel = { description => 'Target Milestone', name => 'target_milestone' } %]
[% INCLUDE select %]
<td colspan="2"></td>
</tr>
[% END %]
<tr>
<td>&nbsp;</td>
<td colspan="3"></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment