bug_form.pl 20.3 KB
Newer Older
1 2
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
3 4 5 6 7 8 9 10 11 12
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
13
# The Original Code is the Bugzilla Bug Tracking System.
14
#
15
# The Initial Developer of the Original Code is Netscape Communications
16 17 18 19
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
20
# Contributor(s): Terry Weissman <terry@mozilla.org>
21
#                 Dave Miller <justdave@syndicomm.com>
22 23 24 25

use diagnostics;
use strict;

26 27
use RelationSet;

28 29 30 31 32 33 34
# Shut up misguided -w warnings about "used only once".  For some reason,
# "use vars" chokes on me when I try it here.

sub bug_form_pl_sillyness {
    my $zz;
    $zz = %::FORM;
    $zz = %::components;
35
    $zz = %::proddesc;
36 37
    $zz = %::prodmaxvotes;
    $zz = %::versions;
38
    $zz = @::legal_keywords;
39 40 41 42
    $zz = @::legal_opsys;
    $zz = @::legal_platform;
    $zz = @::legal_product;
    $zz = @::legal_priority;
43
    $zz = @::settable_resolution;
44
    $zz = @::legal_severity;
45
    $zz = %::target_milestone;
46
}
47

48
my $loginok = quietly_check_login();
49

50 51
my $id = $::FORM{'id'};

52 53
my $query = "
select
54
        bugs.bug_id,
55 56 57 58 59 60 61 62 63 64 65 66 67
        product,
        version,
        rep_platform,
        op_sys,
        bug_status,
        resolution,
        priority,
        bug_severity,
        component,
        assigned_to,
        reporter,
        bug_file_loc,
        short_desc,
68 69 70
        target_milestone,
        qa_contact,
        status_whiteboard,
71
        date_format(creation_ts,'%Y-%m-%d %H:%i'),
72
        groupset,
73 74
        delta_ts,
        sum(votes.count)
75 76 77
from bugs left join votes using(bug_id)
where bugs.bug_id = $id
group by bugs.bug_id";
78 79 80 81

SendSQL($query);
my %bug;
my @row;
82 83 84 85 86 87 88 89 90 91 92
@row = FetchSQLData();
my $count = 0;
foreach my $field ("bug_id", "product", "version", "rep_platform",
                   "op_sys", "bug_status", "resolution", "priority",
                   "bug_severity", "component", "assigned_to", "reporter",
                   "bug_file_loc", "short_desc", "target_milestone",
                   "qa_contact", "status_whiteboard", "creation_ts",
                   "groupset", "delta_ts", "votes") {
    $bug{$field} = shift @row;
    if (!defined $bug{$field}) {
        $bug{$field} = "";
93
    }
94
    $count++;
95 96
}

97 98 99 100
my $assignedtoid = $bug{'assigned_to'};
my $reporterid = $bug{'reporter'};
my $qacontactid =  $bug{'qa_contact'};

101
$bug{'assigned_to_email'} = DBID_to_name($assignedtoid);
102 103
$bug{'assigned_to'} = DBID_to_real_or_loginname($bug{'assigned_to'});
$bug{'reporter'} = DBID_to_real_or_loginname($bug{'reporter'});
104 105 106 107 108 109 110 111

print qq{<FORM NAME="changeform" METHOD="POST" ACTION="process_bug.cgi">\n};

#  foreach my $i (sort(keys(%bug))) {
#      my $q = value_quote($bug{$i});
#      print qq{<INPUT TYPE="HIDDEN" NAME="orig-$i" VALUE="$q">\n};
#  }

112
$bug{'long_desc'} = GetLongDescriptionAsHTML($id);
113
my $longdesclength = length($bug{'long_desc'});
114 115 116

GetVersionTable();

117 118


119 120 121 122 123 124 125 126 127 128
#
# These should be read from the database ...
#

my $platform_popup = make_options(\@::legal_platform, $bug{'rep_platform'});
my $priority_popup = make_options(\@::legal_priority, $bug{'priority'});
my $sev_popup = make_options(\@::legal_severity, $bug{'bug_severity'});


my $component_popup = make_options($::components{$bug{'product'}},
129
                                   $bug{'component'});
130

131 132
my $ccSet = new RelationSet;
$ccSet->mergeFromDB("select who from cc where bug_id=$id");
133 134 135 136 137 138 139 140 141 142
my @ccList = $ccSet->toArrayOfStrings();
my $cc_element = "<INPUT TYPE=HIDDEN NAME=cc VALUE=\"\">";
if (scalar(@ccList) > 0) {
  $cc_element = "<SELECT NAME=cc MULTIPLE SIZE=5>\n";
  foreach my $ccName ( @ccList ) {
    $cc_element .= "<OPTION VALUE=\"$ccName\">$ccName\n";
  }
  $cc_element .= "</SELECT><BR>\n" .
        "<INPUT TYPE=CHECKBOX NAME=removecc>Remove selected CCs<br>\n";
}
143

144
my $URL = value_quote($bug{'bug_file_loc'});
145 146 147 148 149 150 151 152

if (defined $URL && $URL ne "none" && $URL ne "NULL" && $URL ne "") {
    $URL = "<B><A HREF=\"$URL\">URL:</A></B>";
} else {
    $URL = "<B>URL:</B>";
}

print "
153 154
<INPUT TYPE=HIDDEN NAME=\"delta_ts\" VALUE=\"$bug{'delta_ts'}\">
<INPUT TYPE=HIDDEN NAME=\"longdesclength\" VALUE=\"$longdesclength\">
155
<INPUT TYPE=HIDDEN NAME=\"id\" VALUE=$id>
156
  <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
157
    <TD ALIGN=RIGHT><B>Bug#:</B></TD><TD><A HREF=\"" . Param('urlbase') . "show_bug.cgi?id=$bug{'bug_id'}\">$bug{'bug_id'}</A></TD>
158
  <TD>&nbsp;</TD>
159 160
    <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#rep_platform\">Platform:</A></B></TD>
    <TD><SELECT NAME=rep_platform>$platform_popup</SELECT></TD>
161 162 163
  <TD>&nbsp;</TD>
    <TD ALIGN=RIGHT><B>Reporter:</B></TD><TD>$bug{'reporter'}</TD>
</TR><TR>
164 165 166 167
    <TD ALIGN=RIGHT><B>Product:</B></TD>
    <TD><SELECT NAME=product>" .
    make_options(\@::legal_product, $bug{'product'}) .
    "</SELECT></TD>
168
  <TD>&nbsp;</TD>
169 170 171
    <TD ALIGN=RIGHT><B>OS:</B></TD>
    <TD><SELECT NAME=op_sys>" .
    make_options(\@::legal_opsys, $bug{'op_sys'}) .
172 173 174 175 176 177 178 179 180 181 182 183 184 185
    "</SELECT></TD>
  <TD>&nbsp;</TD>
    <TD ALIGN=RIGHT NOWRAP><b>Add CC:</b></TD>
    <TD><INPUT NAME=newcc SIZE=30 VALUE=\"\"></TD>
</TR><TR>
    <TD ALIGN=RIGHT><B><A HREF=\"describecomponents.cgi?product=" .
    url_quote($bug{'product'}) . "\">Component:</A></B></TD>
      <TD><SELECT NAME=component>$component_popup</SELECT></TD>
  <TD>&nbsp;</TD>
    <TD ALIGN=RIGHT><B>Version:</B></TD>
    <TD><SELECT NAME=version>" .
    make_options($::versions{$bug{'product'}}, $bug{'version'}) .
    "</SELECT></TD>
  <TD>&nbsp;</TD>
186
    <TD ROWSPAN=4 ALIGN=RIGHT VALIGN=TOP><B>CC:</B></TD>
187 188
    <TD ROWSPAN=4 VALIGN=TOP> $cc_element </TD>
</TR><TR>
189 190
    <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html\">Status:</A></B></TD>
      <TD>$bug{'bug_status'}</TD>
191
  <TD>&nbsp;</TD>
192 193
    <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Priority:</A></B></TD>
      <TD><SELECT NAME=priority>$priority_popup</SELECT></TD>
194 195
  <TD>&nbsp;</TD>
</TR><TR>
196 197
    <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html\">Resolution:</A></B></TD>
      <TD>$bug{'resolution'}</TD>
198
  <TD>&nbsp;</TD>
199 200
    <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#severity\">Severity:</A></B></TD>
      <TD><SELECT NAME=bug_severity>$sev_popup</SELECT></TD>
201 202
  <TD>&nbsp;</TD>
</TR><TR>
203 204
    <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#assigned_to\">Assigned&nbsp;To:
        </A></B></TD>
205 206
      <TD>$bug{'assigned_to'}</TD>
  <TD>&nbsp;</TD>";
207 208

if (Param("usetargetmilestone")) {
209 210 211 212 213 214 215
    my $url = "";
    if (defined $::milestoneurl{$bug{'product'}}) {
        $url = $::milestoneurl{$bug{'product'}};
    }
    if ($url eq "") {
        $url = "notargetmilestone.html";
    }
216 217 218
    if ($bug{'target_milestone'} eq "") {
        $bug{'target_milestone'} = " ";
    }
219
    print "
220
<TD ALIGN=RIGHT><A href=\"$url\"><B>Target Milestone:</B></A></TD>
221
<TD><SELECT NAME=target_milestone>" .
222
    make_options($::target_milestone{$bug{'product'}},
223
                 $bug{'target_milestone'}) .
224 225 226
                     "</SELECT></TD>
  <TD>&nbsp;</TD>";
} else { print "<TD></TD><TD></TD><TD>&nbsp;</TD>"; }
227 228 229 230 231 232 233 234 235

print "
</TR>";

if (Param("useqacontact")) {
    my $name = $bug{'qa_contact'} > 0 ? DBID_to_name($bug{'qa_contact'}) : "";
    print "
  <TR>
    <TD ALIGN=\"RIGHT\"><B>QA Contact:</B>
236
    <TD COLSPAN=7>
237 238
      <INPUT NAME=qa_contact VALUE=\"" .
    value_quote($name) .
239
    "\" SIZE=60></TD>
240 241 242 243 244 245
  </TR>";
}


print "
  <TR>
246
    <TD ALIGN=\"RIGHT\">$URL
247
    <TD COLSPAN=7>
248
      <INPUT NAME=bug_file_loc VALUE=\"" . value_quote($bug{'bug_file_loc'}) . "\" SIZE=60></TD>
249 250
  </TR><TR>
    <TD ALIGN=\"RIGHT\"><B>Summary:</B>
251
    <TD COLSPAN=7>
252 253 254
      <INPUT NAME=short_desc VALUE=\"" .
    value_quote($bug{'short_desc'}) .
    "\" SIZE=60></TD>
255 256 257 258 259 260
  </TR>";

if (Param("usestatuswhiteboard")) {
    print "
  <TR>
    <TD ALIGN=\"RIGHT\"><B>Status Whiteboard:</B>
261
    <TD COLSPAN=7>
262 263
      <INPUT NAME=status_whiteboard VALUE=\"" .
    value_quote($bug{'status_whiteboard'}) .
264
    "\" SIZE=60></TD>
265 266 267
  </TR>";
}

268 269 270 271 272 273 274 275 276
if (@::legal_keywords) {
    SendSQL("SELECT keyworddefs.name 
             FROM keyworddefs, keywords
             WHERE keywords.bug_id = $id AND keyworddefs.id = keywords.keywordid
             ORDER BY keyworddefs.name");
    my @list;
    while (MoreSQLData()) {
        push(@list, FetchOneColumn());
    }
277
    my $value = value_quote(join(', ', @list));
278 279
    print qq{
<TR>
280
<TD ALIGN=right><B><A HREF="describekeywords.cgi">Keywords:</A></B>
281
<TD COLSPAN=7><INPUT NAME="keywords" VALUE="$value" SIZE=60></TD>
282 283 284 285
</TR>
};
}

286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
# 2001-05-16 myk@mozilla.org: use the attachment tracker to display attachments
# if this installation has enabled use of the attachment tracker.
if (Param('useattachmenttracker')) {
    print "</table>\n";
    use Attachment;
    &Attachment::list($id);
} else {
    print "<tr><td align=right><B>Attachments:</b></td>\n";
    SendSQL("select attach_id, creation_ts, mimetype, description from attachments where bug_id = $id");
    while (MoreSQLData()) {
        my ($attachid, $date, $mimetype, $desc) = (FetchSQLData());
        if ($date =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) {
            $date = "$3/$4/$2 $5:$6";
        }
        my $link = "showattachment.cgi?attach_id=$attachid";
        $desc = value_quote($desc);
302
        $mimetype = html_quote($mimetype);
303
        print qq{<td><a href="$link">$date</a></td><td colspan=6>$desc&nbsp;&nbsp;&nbsp;($mimetype)</td></tr><tr><td></td>};
304
    }
305
    print "<td colspan=7><a href=\"createattachment.cgi?id=$id\">Create a new attachment</a> (proposed patch, testcase, etc.)</td></tr></table>\n";
306 307 308 309 310 311 312
}


sub EmitDependList {
    my ($desc, $myfield, $targetfield) = (@_);
    print "<th align=right>$desc:</th><td>";
    my @list;
313 314
    SendSQL("select $targetfield from dependencies where  
             $myfield = $id order by $targetfield");
315
    while (MoreSQLData()) {
316
        my ($i) = (FetchSQLData());
317
        push(@list, $i);
318
        print GetBugLink($i, $i);
319 320 321 322
        print " ";
    }
    print "</td><td><input name=$targetfield value=\"" .
        join(',', @list) . "\"></td>\n";
323 324
}

325 326
if (Param("usedependencies")) {
    print "<table><tr>\n";
327
    EmitDependList("Bug $id depends on", "blocked", "dependson");
328 329 330 331 332 333 334 335 336
    print qq{
<td rowspan=2><a href="showdependencytree.cgi?id=$id">Show dependency tree</a>
};
    if (Param("webdotbase") ne "") {
        print qq{
<br><a href="showdependencygraph.cgi?id=$id">Show dependency graph</a>
};
    }
    print "</td></tr><tr>";
337
    EmitDependList("Bug $id blocks", "dependson", "blocked");
338 339
    print "</tr></table>\n";
}
340

341 342 343
if ($::prodmaxvotes{$bug{'product'}}) {
    print qq{
<table><tr>
344 345 346 347 348 349 350
<th><a href="votehelp.html">Votes:</a></th>
<td>
$bug{'votes'}&nbsp;&nbsp;&nbsp;
<a href="showvotes.cgi?bug_id=$id">Show votes for this bug</a>&nbsp;&nbsp;&nbsp;
<a href="showvotes.cgi?voteon=$id">Vote for this bug</a>
</td>
</tr></table>
351 352 353
};
}

354
print "
355 356 357
<br>
<B>Additional Comments:</B>
<BR>
358
<TEXTAREA WRAP=HARD NAME=comment ROWS=10 COLS=80></TEXTAREA><BR>";
359 360


361
if ($::usergroupset ne '0') {
362
    SendSQL("select bit, name, description, (bit & $bug{'groupset'} != 0) " .
363 364
            "from groups where bit & $::usergroupset != 0 " .
            "and isbuggroup != 0 " . 
365 366 367 368
            # Include active groups as well as inactive groups to which
            # the bug already belongs.  This way the bug can be removed
            # from an inactive group but can only be added to active ones.
            "and (isactive = 1 or (bit & $bug{'groupset'} != 0)) " . 
369
            "order by description");
370 371
    # We only print out a header bit for this section if there are any
    # results.
372
    my $groupFound = 0;
373
    while (MoreSQLData()) {
374 375 376 377 378 379 380
      my ($bit, $name, $description, $ison) = (FetchSQLData());
      # For product groups, we only want to display the checkbox if either
      # (1) The bit is already set, or
      # (2) It's the group for this product.
      # All other product groups will be skipped.  Non-product bug groups
      # will still be displayed.
      if($ison || ($name eq $bug{'product'}) || (!defined $::proddesc{$name})) {
381 382 383 384 385
        if(!$groupFound) {
          print "<br><b>Only users in the selected groups can view this bug:</b><br>\n";
          print "<font size=\"-1\">(Leave all boxes unchecked to make this a public bug.)</font><br><br>\n";
          $groupFound = 1;
        }
386 387 388 389 390 391 392
        # Modifying this to use checkboxes instead
        my $checked = $ison ? " CHECKED" : "";
        # indent these a bit
        print "&nbsp;&nbsp;&nbsp;&nbsp;";
        print "<input type=checkbox name=\"bit-$bit\" value=1$checked>\n";
        print "$description<br>\n";
      }
393
    }
394

395 396 397 398 399
    # If the bug is restricted to a group, display checkboxes that allow
    # the user to set whether or not the reporter, assignee, QA contact, 
    # and cc list can see the bug even if they are not members of all 
    # groups to which the bug is restricted.
    if ( $bug{'groupset'} != 0 ) {
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
        # Determine whether or not the bug is always accessible by the reporter,
        # QA contact, and/or users on the cc: list.
        SendSQL("SELECT  reporter_accessible , assignee_accessible , 
                         qacontact_accessible , cclist_accessible
                 FROM    bugs
                 WHERE   bug_id = $id
                ");
        my ($reporter_accessible, $assignee_accessible, $qacontact_accessible, $cclist_accessible) = FetchSQLData();

        # Convert boolean data about which roles always have access to the bug
        # into "checked" attributes for the HTML checkboxes by which users
        # set and change these values.
        my $reporter_checked = $reporter_accessible ? " checked" : "";
        my $assignee_checked = $assignee_accessible ? " checked" : "";
        my $qacontact_checked = $qacontact_accessible ? " checked" : "";
        my $cclist_checked = $cclist_accessible ? " checked" : "";

        # Display interface for changing the values.
        print qq|
            <p>
            <b>But users in the roles selected below can always view this bug:</b><br>
            <small>(Does not take effect unless the bug is restricted to at least one group.)</small>
            </p>

            <p>
            <input type="checkbox" name="reporter_accessible" value="1" $reporter_checked>Reporter
            <input type="checkbox" name="assignee_accessible" value="1" $assignee_checked>Assignee
            <input type="checkbox" name="qacontact_accessible" value="1" $qacontact_checked>QA Contact
            <input type="checkbox" name="cclist_accessible" value="1" $cclist_checked>CC List
            </p>
        |;
    }
432 433
}

434 435 436 437




438
print "<br>
439 440 441
<INPUT TYPE=radio NAME=knob VALUE=none CHECKED>
        Leave as <b>$bug{'bug_status'} $bug{'resolution'}</b><br>";

442

443 444 445 446 447 448
# knum is which knob number we're generating, in javascript terms.

my $knum = 1;

my $status = $bug{'bug_status'};

449 450 451 452 453 454 455 456
# In the below, if the person hasn't logged in ($::userid == 0), then
# we treat them as if they can do anything.  That's because we don't
# know why they haven't logged in; it may just be because they don't
# use cookies.  Display everything as if they have all the permissions
# in the world; their permissions will get checked when they log in
# and actually try to make the change.

my $canedit = UserInGroup("editbugs") || ($::userid == 0);
457 458 459
my $canconfirm;

if ($status eq $::unconfirmedstate) {
460
    $canconfirm = UserInGroup("canconfirm") || ($::userid == 0);
461 462
    if ($canedit || $canconfirm) {
        print "<INPUT TYPE=radio NAME=knob VALUE=confirm>";
463
        print "Confirm bug (change status to <b>NEW</b>)<br>";
464 465
        $knum++;
    }
466 467
}

468 469 470
my $movers = Param("movers");
$movers =~ s/\s?,\s?/|/g;
$movers =~ s/@/\@/g;
471

472 473
if ($canedit || $::userid == $assignedtoid ||
      $::userid == $reporterid || $::userid == $qacontactid) {
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489
    if (IsOpenedState($status)) {
        if ($status ne "ASSIGNED") {
            print "<INPUT TYPE=radio NAME=knob VALUE=accept>";
            my $extra = "";
            if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) {
                $extra = "confirm bug, ";
            }
            print "Accept bug (${extra}change status to <b>ASSIGNED</b>)<br>";
            $knum++;
        }
        if ($bug{'resolution'} ne "") {
            print "<INPUT TYPE=radio NAME=knob VALUE=clearresolution>\n";
            print "Clear the resolution (remove the current resolution of\n";
            print "<b>$bug{'resolution'}</b>)<br>\n";
            $knum++;
        }
490 491
        my $resolution_popup = make_options(\@::settable_resolution,
                                            $bug{'resolution'});
492
        print "<INPUT TYPE=radio NAME=knob VALUE=resolve>
493 494 495 496
        Resolve bug, changing <A HREF=\"bug_status.html\">resolution</A> to
        <SELECT NAME=resolution
          ONCHANGE=\"document.changeform.knob\[$knum\].checked=true\">
          $resolution_popup</SELECT><br>\n";
497 498
        $knum++;
        print "<INPUT TYPE=radio NAME=knob VALUE=duplicate>
499
        Resolve bug, mark it as duplicate of bug # 
500
        <INPUT NAME=dup_id SIZE=6 ONCHANGE=\"if (this.value != '') {document.changeform.knob\[$knum\].checked=true}\"><br>\n";
501
        $knum++;
502
        my $assign_element = "<INPUT NAME=\"assigned_to\" SIZE=32 ONCHANGE=\"if ((this.value != ".SqlQuote($bug{'assigned_to_email'}) .") && (this.value != '')) { document.changeform.knob\[$knum\].checked=true; }\" VALUE=\"$bug{'assigned_to_email'}\">";
503

504
        print "<INPUT TYPE=radio NAME=knob VALUE=reassign> 
505 506 507
          <A HREF=\"bug_status.html#assigned_to\">Reassign</A> bug to
          $assign_element
        <br>\n";
508 509 510 511 512
        if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) {
            print "&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE=checkbox NAME=andconfirm> and confirm bug (change status to <b>NEW</b>)<BR>";
        }
        $knum++;
        print "<INPUT TYPE=radio NAME=knob VALUE=reassignbycomponent>
513 514 515
          Reassign bug to owner ";
        if (Param("useqacontact")) { print "and QA contact "; }
        print "of selected component<br>\n";
516 517 518
        if ($status eq $::unconfirmedstate && ($canconfirm || $canedit)) {
            print "&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE=checkbox NAME=compconfirm> and confirm bug (change status to <b>NEW</b>)<BR>";
        }
519
        $knum++;
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535
    } elsif ( Param("move-enabled") && ($bug{'resolution'} eq "MOVED") ) {
        if ( (defined $::COOKIE{"Bugzilla_login"}) 
             && ($::COOKIE{"Bugzilla_login"} =~ /($movers)/) ){
          print "<INPUT TYPE=radio NAME=knob VALUE=reopen> Reopen bug<br>\n";
          $knum++;
          if ($status eq "RESOLVED") {
              print "<INPUT TYPE=radio NAME=knob VALUE=verify>
          Mark bug as <b>VERIFIED</b><br>\n";
              $knum++;
          }
          if ($status ne "CLOSED") {
              print "<INPUT TYPE=radio NAME=knob VALUE=close>
          Mark bug as <b>CLOSED</b><br>\n";
              $knum++;
          }
        }
536 537
    } else {
        print "<INPUT TYPE=radio NAME=knob VALUE=reopen> Reopen bug<br>\n";
538
        $knum++;
539 540 541 542 543 544 545 546 547 548
        if ($status eq "RESOLVED") {
            print "<INPUT TYPE=radio NAME=knob VALUE=verify>
        Mark bug as <b>VERIFIED</b><br>\n";
            $knum++;
        }
        if ($status ne "CLOSED") {
            print "<INPUT TYPE=radio NAME=knob VALUE=close>
        Mark bug as <b>CLOSED</b><br>\n";
            $knum++;
        }
549 550 551 552 553 554
    }
}
 
print "
<INPUT TYPE=\"submit\" VALUE=\"Commit\">
<INPUT TYPE=\"reset\" VALUE=\"Reset\">
555
<INPUT TYPE=\"hidden\" name=\"form_name\" VALUE=\"process_bug\">
556
<P>
557
<FONT size=\"+1\"><B>
558
 <A HREF=\"show_activity.cgi?id=$id\">View Bug Activity</A>
559
 &nbsp; | &nbsp;
560
 <A HREF=\"long_list.cgi?buglist=$id\">Format For Printing</A>
561
</B></FONT>
562 563 564
";

if ( Param("move-enabled") && (defined $::COOKIE{"Bugzilla_login"}) && ($::COOKIE{"Bugzilla_login"} =~ /($movers)/) ){
565 566 567
  print "&nbsp; <FONT size=\"+1\"><B> | </B></FONT> &nbsp;"
       ."<INPUT TYPE=\"SUBMIT\" NAME=\"action\" VALUE=\"" 
       . Param("move-button-text") . "\">\n";
568 569
}

570
print "<BR></FORM>";
571

572 573
print qq|
<table><tr><td align=left><B><a name="0" href="#c0">Description:</a></B></td>
574
<td align=right width=100%>Opened: $bug{'creation_ts'}</td></tr></table>
575
<HR>
576
|;
577
print $bug{'long_desc'};
578
print "
579 580 581 582
<HR>\n";

# To add back option of editing the long description, insert after the above
# long_list.cgi line:
583
#  <A HREF=\"edit_desc.cgi?id=$id\">Edit Long Description</A>
584 585 586

navigation_header();

587 588
PutFooter();

589
1;