From 6b2eec91f21d4aa28e68f18435c8636f377a4b2a Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Wed, 22 Mar 2000 00:47:04 +0000 Subject: Patch by "Matt Masson" -- allow definition of different target milestones by product. --- editproducts.cgi | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) (limited to 'editproducts.cgi') diff --git a/editproducts.cgi b/editproducts.cgi index db607b404..f0cc7b61b 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -485,6 +485,29 @@ if ($action eq 'del') { print "missing"; } + # + # Adding listing for associated target milestones - matthew@zeroknowledge.com + # + if (Param('usetargetmilestone')) { + print "\n\n"; + print " Edit milestones:\n"; + print " "; + SendSQL("SELECT value + FROM milestones + WHERE product=" . SqlQuote($product) . " + ORDER BY sortkey,value"); + if(MoreSQLData()) { + my $br = 0; + while ( MoreSQLData() ) { + my ($milestone) = FetchSQLData(); + print "
" if $br; + print $milestone; + $br = 1; + } + } else { + print "missing"; + } + } print "\n\n"; print " Bugs:\n"; @@ -548,7 +571,8 @@ if ($action eq 'delete') { versions WRITE, products WRITE, groups WRITE, - profiles WRITE"); + profiles WRITE, + milestones WRITE"); # According to MySQL doc I cannot do a DELETE x.* FROM x JOIN Y, # so I have to iterate over bugs and delete all the indivial entries @@ -589,6 +613,11 @@ if ($action eq 'delete') { WHERE program=" . SqlQuote($product)); print "Versions deleted.

\n"; + # deleting associated target milestones - matthew@zeroknowledge.com + SendSQL("DELETE FROM milestones + WHERE product=" . SqlQuote($product)); + print "Milestones deleted.
\n"; + SendSQL("DELETE FROM products WHERE product=" . SqlQuote($product)); print "Product '$product' deleted.
\n"; @@ -700,6 +729,29 @@ if ($action eq 'edit') { print "missing"; } + # + # Adding listing for associated target milestones - matthew@zeroknowledge.com + # + if (Param('usetargetmilestone')) { + print "\n\n"; + print " Edit milestones:\n"; + print " "; + SendSQL("SELECT value + FROM milestones + WHERE product=" . SqlQuote($product) . " + ORDER BY sortkey,value"); + if(MoreSQLData()) { + my $br = 0; + while ( MoreSQLData() ) { + my ($milestone) = FetchSQLData(); + print "
" if $br; + print $milestone; + $br = 1; + } + } else { + print "missing"; + } + } print "\n\n"; print " Bugs:\n"; @@ -782,7 +834,8 @@ if ($action eq 'update') { products WRITE, versions WRITE, groups WRITE, - profiles WRITE"); + profiles WRITE, + milestones WRITE"); if ($disallownew ne $disallownewold) { $disallownew ||= 0; @@ -923,6 +976,7 @@ if ($action eq 'update') { SendSQL("UPDATE components SET program=$qp WHERE program=$qpold"); SendSQL("UPDATE products SET product=$qp WHERE product=$qpold"); SendSQL("UPDATE versions SET program=$qp WHERE program=$qpold"); + SendSQL("UPDATE milestones SET product=$qp WHERE product=$qpold"); # Need to do an update to groups as well. If there is a corresponding # bug group, whether usebuggroups is currently set or not, we want to # update it so it will match in the future. If there is no group, this -- cgit v1.2.3-24-g4f1b