aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default/bug/edit.html.tmpl
blob: 4af65af1c4259868232d6676bd195ae54cb45a47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
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
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
<!-- 1.0@bugzilla.org -->
[%# 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.
  #
  # The Original Code is the Bugzilla Bug Tracking System.
  #
  # The Initial Developer of the Original Code is Netscape Communications
  # Corporation. Portions created by Netscape are
  # Copyright (C) 1998 Netscape Communications Corporation. All
  # Rights Reserved.
  #
  # Contributor(s): Gervase Markham <gerv@gerv.net>
  #                 Vaskin Kissoyan <vkissoyan@yahoo.com> 
  #%]

[% filtered_desc = bug.short_desc FILTER html %]
[% UNLESS header_done %]
  [% PROCESS global/header.html.tmpl 
    title = "Bug $bug.bug_id - $bug.short_desc"
    h1 = "Bugzilla Bug $bug.bug_id"
    h2 = filtered_desc
    h3 = "Last modified: $bug.calc_disp_date"
    style_urls = [ "css/edit_bug.css" ]
   %]
[% END %]

[% PROCESS bug/navigate.html.tmpl %]
[% PROCESS bug/time.html.tmpl %]

[% IF UserInGroup(Param('timetrackinggroup')) %]
  <script type="text/javascript" language="JavaScript">
  <!--
  var fRemainingTime = [% bug.remaining_time %]; // holds the original value
  function adjustRemainingTime() {
     // subtracts time spent from remaining time
     var new_time;

     new_time =
        fRemainingTime - document.changeform.work_time.value;
     // get upto 2 decimal places
     document.changeform.remaining_time.value = 
          Math.round(new_time * 100)/100;
  }

  function updateRemainingTime() {
     // if the remaining time is changed manually, update fRemainingTime
     fRemainingTime = document.changeform.remaining_time.value;
  }

  //-->
  </script>
[% END %]

<hr>

<form name="changeform" method="post" action="process_bug.cgi">

  <input type="hidden" name="delta_ts" value="[% bug.delta_ts %]">
  <input type="hidden" name="longdesclength" value="[% bug.longdesclength %]">
  <input type="hidden" name="id" value="[% bug.bug_id %]">

[%# *** Hardware Reporter Product OS AddCC *** %]

  <table cellspacing="1" cellpadding="1" border="0">
    <tr>      
      <td align="right">
        <b>Bug#:</b>
      </td>
      <td>
        <a href="[% Param('urlbase') %]show_bug.cgi?id=[% bug.bug_id %]">
          [% bug.bug_id %]</a>
          [% IF Param("usebugaliases") %]
            <label title="a name for the bug that can be used in place of its ID number, f.e. when adding it to a list of dependencies">
              <b>alias:</b>
              <input name="alias" value="[% bug.alias FILTER html %]" size="20" maxlength="20">
            </label>
          [% END %]
      </td>
      
      <td>&nbsp;</td>

      <td align="right">
        <b><u>H</u>ardware:</b>
      </td>
      [% PROCESS select selname => "rep_platform" accesskey => "h" %]
      
      <td align="right">
        <b>Reporter:</b>
      </td>
      <td>
        [% bug.reporter FILTER html %]
      </td>    
    </tr>
    
    <tr>
      <td align="right">
        <b><u>P</u>roduct:</b>
      </td>
      [% PROCESS select selname => "product" accesskey => "p" %]
      
      <td align="right">
        <b><u>O</u>S:</b>
      </td>
      [% PROCESS select selname => "op_sys" accesskey => "o" %]

      <td align="right">
        <b><u>A</u>dd&nbsp;CC:</b>
      </td>
      <td>
        <input name="newcc" size="30" value="" accesskey="a">
      </td>
    </tr>

[%# *** Component Version CC Priority Severity AssignedTo Milestone *** %]    

    <tr>
      <td align="right">
        <b>
          <a href="describecomponents.cgi?product=[% bug.product FILTER url_quote %]">
            Co<u>m</u>ponent</a>:
        </b>
      </td>
      <td>
        <label for="component" accesskey="m">
          <select name="component" id="component">
            [% FOREACH x = component_ %]
              <option value="[% x FILTER html %]"
                [% " selected" IF x == bug.component %]>[% x FILTER html %]
              </option>
            [% END %]
          </select>
        </label>
      </td>

      <td>&nbsp;</td>
 
      <td align="right">
        <b><u>V</u>ersion:</b>
      </td>
      [% PROCESS select selname => "version" accesskey => "v" %]
      
      <td rowspan="4" align="right" valign="top">
        <b>CC:</b>
      </td>
      <td rowspan="4" valign="top"> 
      [% IF bug.cc %]
        <select name="cc" multiple="multiple" size="5">
        [% FOREACH c = bug.cc %]
          <option value="[% c FILTER html %]">[% c FILTER html %]</option>
        [% END %]
        </select>
        <br>
        <input type="checkbox" name="removecc">Remove selected CCs
        <br>
      [% ELSE %]
        <input type="hidden" name="cc" value="">
      [% END %]
      </td>
    </tr>
    
    <tr>
      <td align="right">
        <b>
          <a href="bug_status.html">Status</a>:
        </b>
      </td>
      <td>[% bug.bug_status FILTER html %]</td>      
      <td>&nbsp;</td>
      
      <td align="right">
        <b><a href="bug_status.html#priority">Pr<u>i</u>ority</a>:</b>
      </td>
      [% PROCESS select selname => "priority" accesskey => "i" %]
    </tr>
    
    <tr>
      <td align="right">
        <b>
          <a href="bug_status.html">Resolution</a>:
        </b>
      </td>
      <td>[% bug.resolution FILTER html %]</td>      
      <td>&nbsp;</td>
      
      <td align="right">
        <b><a href="bug_status.html#severity">S<u>e</u>verity</a>:</b>
      </td>
      [% PROCESS select selname = "bug_severity" accesskey => "e" %]
      
    </tr>
    
    <tr>
      <td align="right">
        <b>
          <a href="bug_status.html#assigned_to">Assigned&nbsp;To</a>:
        </b>
      </td>
      <td>[% bug.assigned_to FILTER html %]</td>
      <td>&nbsp;</td>
 
      [% IF Param("usetargetmilestone") && bug.target_milestone %]
        <td align="right">
          <b>
            <a href="[% bug.milestoneurl FILTER html %]"><u>T</u>arget
            Milestone</a>:
          </b>
        </td>
        [% PROCESS select selname = "target_milestone" accesskey => "t" %]
      [% ELSE %]
        <td colspan="3">&nbsp;</td>
      [% END %]
    </tr>

[%# *** QAContact URL Requests Summary Whiteboard Keywords *** %]

   [% IF Param('useqacontact') %]
     <tr>
       <td align="right">
       <b><u>Q</u>A Contact:</b>
       </td>
       <td colspan="7">
         <input name="qa_contact" accesskey="q"
                value="[% bug.qa_contact FILTER html %]" size="60">
       </td>
     </tr>
   [% END %]

  <tr>
    <td align="right">
      <b>
        [% IF bug.bug_file_loc %]
          <a href="[% bug.bug_file_loc FILTER html %]"><u>U</u>RL</a>:
        [% ELSE %]
          <u>U</u>RL:
        [% END %]
      </b>
    </td>
    <td colspan="5">
      <input name="bug_file_loc" accesskey="u"
             value="[% bug.bug_file_loc FILTER html %]" size="60">
    </td>
    <td rowspan="4" colspan="2" valign="top"> 
        [% IF flag_types.size > 0 %]
          [% PROCESS "flag/list.html.tmpl" %]
        [% END %]
    </td>
  </tr>
  
  <tr>
    <td align="right">
      <b><u>S</u>ummary:</b>
    </td>
    <td colspan="5">
      <input name="short_desc" accesskey="s"
             value="[% bug.short_desc FILTER html %]" size="60">
    </td>
  </tr>

  [% IF Param('usestatuswhiteboard') %] 
    <tr>
      <td align="right">
        <b>Status <u>W</u>hiteboard:</b>
      </td>
      <td colspan="5">
        <input name="status_whiteboard" accesskey="w"
               value="[% bug.status_whiteboard FILTER html %]" size="60">
      </td>
    </tr>
  [% END %]

  [% IF use_keywords %]
    <tr>
      <td align="right">
        <b>
          <a href="describekeywords.cgi"><u>K</u>eywords</a>:
        </b>
      <td colspan="5">
        <input name="keywords" accesskey="k"
               value="[% bug.keywords.join(', ') FILTER html %]" size="60">
      </td>
    </tr> 
  [% END %]
  </table>

  [% IF UserInGroup(Param('timetrackinggroup')) %]
    <br>
    <table cellspacing="0" cellpadding="4" border="1">
      <tr>
        <th align="center" bgcolor="#cccccc">
          Orig. Est.
        </th>
        <th align="center" bgcolor="#cccccc">
          Current Est.
        </th>
        <th align="center" bgcolor="#cccccc">
          Hours Worked
        </th>
        <th align="center" bgcolor="#cccccc">
          Hours Left
        </th>
        <th align="center" bgcolor="#cccccc">
          %Complete
        </th>
        <th align="center" bgcolor="#cccccc">
          Gain
        </th>
      </tr>
      <tr>
        <td align="center">
          <input name="estimated_time"
                 value="[% PROCESS formattimeunit 
                                   time_unit=bug.estimated_time %]"
                 size="6" maxlength="6">
        </td>
        <td align="center">
          [% PROCESS formattimeunit 
                     time_unit=(bug.actual_time + bug.remaining_time) %]
        </td>
        <td align="center">
          [% PROCESS formattimeunit time_unit=bug.actual_time %] + 
          <input name="work_time" value="0" size="3" maxlength="6"
                 onchange="adjustRemainingTime();">
        </td>
        <td align="center">
          <input name="remaining_time"
                 value="[% PROCESS formattimeunit
                                   time_unit=bug.remaining_time %]"
                 size="6" maxlength="6" onchange="updateRemainingTime();">
        </td>
        <td align="center">
          [% PROCESS calculatepercentage act=bug.actual_time
                                         rem=bug.remaining_time %]
        </td>
        <td align="center">
          [% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %]
        </td>
      </tr>
    </table>
  [% END %]
  
[%# *** Attachments *** %]

  [% PROCESS attachment/list.html.tmpl 
             attachments = bug.attachments 
             bugid       = bug.bug_id  %]

[%# *** Dependencies Votes *** %]

  <table>
    <tr>
    [% PROCESS dependencies accesskey = "d"
       dep = { title => "<u>d</u>epends on", fieldname => "dependson" } %]
      <td rowspan="2">
        <a href="showdependencytree.cgi?id=[% bug.bug_id %]">Show 
        dependency tree</a>  

        [% IF Param('webdotbase') %]  
          <br>
          <a href="showdependencygraph.cgi?id=[% bug.bug_id %]">Show 
          dependency graph</a>
        [% END %]
      </td>
    </tr>

    <tr>
    [% PROCESS dependencies accesskey = "b"
       dep = { title => "<u>b</u>locks", fieldname => "blocked" } %]
    </tr>
  </table>

  [% IF use_votes %]
  <table>
    <tr>
      <th>
        <a href="votehelp.html">Votes</a>:
      </th>
      <td>
        [% bug.votes %]&nbsp;&nbsp;&nbsp;
        <a href="votes.cgi?action=show_bug&amp;bug_id=[% bug.bug_id %]">Show 
        votes for this bug</a>&nbsp;&nbsp;&nbsp;
        <a href="votes.cgi?action=show_user&amp;bug_id=[% bug.bug_id %]">Vote 
        for this bug</a>
      </td>
    </tr>
  </table>
  [% END %]

[%# *** Comments Groups *** %]

  <br>
  <b>Additional <u>C</u>omments:</b>
  [% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %]
    <input type="checkbox" name="commentprivacy" value="1"> Private
  [% END %]
  <br>
  <textarea wrap="hard" name="comment" rows="10" cols="80"
            accesskey="c"></textarea>
  <br>

  [% IF groups.size > 0 %]

    [% FOREACH group = groups %]
      [% IF NOT group.mandatory %]
        [% IF NOT emitted_description %]
          [% emitted_description = 1 %]
          <br>
          <b>Only users in all of the selected groups can view this bug:</b>
          <br>
          <font size="-1">
            (Unchecking all boxes makes this a more public bug.)
          </font>
          <br>
          <br>
        [% END %]

      &nbsp;&nbsp;&nbsp;&nbsp;
      <input type="checkbox" name="bit-[% group.bit %]" value="1" 
        [% " checked=\"checked\"" IF group.ison %]
        [% " disabled=\"disabled\"" IF NOT group.ingroup %]>
      [% group.description %]
      <br>
      [% END %]
    [% END %]

    [% IF NOT user.inallgroups %]
      <b>
        Only members of a group can change the visibility of a bug for 
        that group
      </b>
    <br>
    [% END %]

    [% IF bug.inagroup %]
      <p>
        <b>Users in the roles selected below can always view this bug:</b>
        <br>
        <small>
          (The assignee                                                
          [% IF (Param('useqacontact')) %]
             and QA contact
          [% END %]
          can always see a bug, and this section 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"
          [% " checked" IF bug.reporter_accessible %]>Reporter
        <input type="checkbox" name="cclist_accessible" value="1"
          [% " checked" IF bug.cclist_accessible %]>CC List
      </p>  
    [% END %]
  [% END %]

[%# *** Knob *** %]

  <br>
  <input type="radio" name="knob" value="none" checked="checked">
  Leave as <b>[% bug.bug_status FILTER html %]&nbsp;
              [% bug.resolution FILTER html %]</b>
  <br>

  [% knum = 1 %]

  [% IF bug.bug_status == "UNCONFIRMED" && 
        user.canconfirm %]
    <input type="radio" name="knob" value="confirm">
    Confirm bug (change status to <b>NEW</b>)
    <br>
    [% knum = knum + 1 %]
  [% END %]

  [% IF user.canedit %]
    [% IF bug.isopened %]
      [% IF bug.bug_status != "ASSIGNED" && user.canconfirm %]
        <input type="radio" name="knob" value="accept">
        Accept bug (
        [% "confirm bug, " IF bug.isunconfirmed %]change
        status to <b>ASSIGNED</b>)
        <br>
        [% knum = knum + 1 %]
      [% END %]

      [% IF bug.resolution %]
        <input type="radio" name="knob" value="clearresolution">
        Clear the resolution (remove the current resolution of
        <b>[% bug.resolution FILTER html %]</b>)<br>      
        [% knum = knum + 1 %]
      [% END %]

      <input type="radio" name="knob" value="resolve">
      Resolve bug, changing <a href="bug_status.html">resolution</a> to
      <select name="resolution" 
              onchange="document.changeform.knob[[% knum %]].checked=true">
      [% FOREACH r = resolution %]
        <option value="[% r FILTER html %]">[% r FILTER html %]</option>
      [% END %]
      </select>
      <br>
      [% knum = knum + 1 %]

      <input type="radio" name="knob" value="duplicate">
      Resolve bug, mark it as duplicate of bug # 
      <input name="dup_id" size="6" 
             onchange="if (this.value != '')
                       {document.changeform.knob[[% knum %]].checked=true}">
      <br>
      [% knum = knum + 1 %]

      <input type="radio" name="knob" value="reassign"> 
      <a href="bug_status.html#assigned_to">Reassign</a> bug to
      <input name="assigned_to" size="32" 
             onchange="if ((this.value != '[% bug.assigned_to_email FILTER js %]') && 
                            (this.value != '')) {
                         document.changeform.knob[[% knum %]].checked=true; 
                       }"  
             value="[% bug.assigned_to_email FILTER html %]">
      <br>
      [% IF bug.isunconfirmed && user.canconfirm %]
        &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="andconfirm">
        and confirm bug (change status to <b>NEW</b>)
        <br>
      [% END %]
      [% knum = knum + 1 %]

      <input type="radio" name="knob" value="reassignbycomponent">
      Reassign bug to owner
      [% " and QA contact" IF Param('useqacontact') %]
      of selected component
      <br>
      [% IF bug.isunconfirmed && user.canconfirm %]
        &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="compconfirm">
        and confirm bug (change status to <b>NEW</b>)
        <br>
      [% END %]
      [% knum = knum + 1 %]
    [% ELSE %]
      [% IF bug.resolution != "MOVED" ||
           (bug.resolution == "MOVED" && user.canmove) %]  
        <input type="radio" name="knob" value="reopen"> Reopen bug
        <br>
        [% knum = knum + 1 %]
      [% END %]
      [% IF bug.bug_status == "RESOLVED" %]
        <input type="radio" name="knob" value="verify">
        Mark bug as <b>VERIFIED</b><br>
        [% knum = knum + 1 %]
      [% END %]
      [% IF bug.bug_status != "CLOSED" %]
        <input type="radio" name="knob" value="close">
        Mark bug as <b>CLOSED</b><br>
        [% knum = knum + 1 %]
      [% END %]
    [% END %]
  [% END %]  
  
  <input type="submit" value="Commit">
  <input type="hidden" name="form_name" value="process_bug">
  <p>
    <font size="+1">
      <b>
        <a href="show_activity.cgi?id=[% bug.bug_id %]">View Bug Activity</a>
        &nbsp; | &nbsp;
        <a href="long_list.cgi?buglist=[% bug.bug_id %]">Format For Printing</a>
      </b>
    </font>

    [% IF user.canmove %]
      &nbsp; <font size="+1"><b> | </b></font> &nbsp;
      <input type="submit" name="action" 
             value="[% Param("move-button-text") %]">
    [% END %]
  </p>  

[%# *** Additional Comments *** %]

<table>
  <tr>
    <td align="left">
      <b>
        <a name="c0" href="#c0">Description</a>:
      </b>
    </td>
    <td align="right" width="100%">
      Opened: [% bug.creation_ts %]
    </td>
  </tr>
</table>
<hr>

[% PROCESS bug/comments.html.tmpl 
   comments = bug.comments 
   mode = "edit"
 %]
  
</form>
<hr>

[% PROCESS bug/navigate.html.tmpl %]

<br>

[% PROCESS global/footer.html.tmpl %]


[%############################################################################%]
[%# Block for dependencies                                                   #%]
[%############################################################################%]

[% BLOCK dependencies %]
  <th align="right">Bug [% bug.bug_id %] [%+ dep.title %]:</th>
  <td>
  [% FOREACH depbug = bug.${dep.fieldname} %]
    [% GetBugLink(depbug, depbug) %][% " " %]
  [% END %]
  </td>
  <td>
    <input name="[% dep.fieldname %]" accesskey="[% accesskey %]"
           value="[% bug.${dep.fieldname}.join(', ') %]">
  </td>
[% END %]


[%############################################################################%]
[%# Block for SELECT fields                                                  #%]
[%############################################################################%]

[% BLOCK select %]  
  <td>
    <label for="[% selname %]" accesskey="[% accesskey %]">
      <select name="[% selname %]" id="[% selname %]">
        [% FOREACH x = ${selname} %]
          <option value="[% x FILTER html %]"
            [% " selected" IF x == bug.${selname} %]>[% x FILTER html %]
          </option>
        [% END %]
      </select>
    </label>
  </td>
  <td>&nbsp;</td>
[% END %]