From 4aa03da5994e4e138734f518ab3f85471a6031c8 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Fri, 24 Mar 2000 02:22:34 +0000 Subject: Added the concept of a "default milstone" for products, and make sure that all products have at least that milestone defined. --- post_bug.cgi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'post_bug.cgi') diff --git a/post_bug.cgi b/post_bug.cgi index 975d407d8..3c5f0698f 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -105,7 +105,8 @@ $::FORM{'reporter'} = DBNameToIdAndCheck($::FORM{'reporter'}); my @bug_fields = ("reporter", "product", "version", "rep_platform", "bug_severity", "priority", "op_sys", "assigned_to", - "bug_status", "bug_file_loc", "short_desc", "component"); + "bug_status", "bug_file_loc", "short_desc", "component", + "target_milestone"); if (Param("useqacontact")) { SendSQL("select initialqacontact from components where program=" . @@ -139,11 +140,19 @@ if (!exists $::FORM{'bug_status'}) { } } +if (!exists $::FORM{'target_milestone'}) { + SendSQL("SELECT defaultmilestone FROM products " . + "WHERE product = " . SqlQuote($::FORM{'product'})); + $::FORM{'target_milestone'} = FetchOneColumn(); +} + if ( Param("strictvaluechecks") ) { GetVersionTable(); CheckFormField(\%::FORM, 'reporter'); CheckFormField(\%::FORM, 'product', \@::legal_product); CheckFormField(\%::FORM, 'version', \@{$::versions{$::FORM{'product'}}}); + CheckFormField(\%::FORM, 'target_milestone', + \@{$::target_milestone{$::FORM{'product'}}}); CheckFormField(\%::FORM, 'rep_platform', \@::legal_platform); CheckFormField(\%::FORM, 'bug_severity', \@::legal_severity); CheckFormField(\%::FORM, 'priority', \@::legal_priority); -- cgit v1.2.3-24-g4f1b