Fossil SCM

New and improved default ticket setup.

drh 2012-11-23 22:29 UTC ticket-enhancements
Commit 340040a8a547825f91302f7770318cf1c9fa5eb3
1 file changed +180 -65
+180 -65
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -277,84 +277,122 @@
277277
);
278278
}
279279
280280
static const char zDefaultNew[] =
281281
@ <th1>
282
+@ if {![info exists mutype]} {set mutype {[links only]}}
282283
@ if {[info exists submit]} {
283284
@ set status Open
285
+@ set ctxt "<i>By [htmlize $login] on [date] UTC:</i><br />"
286
+@ if {$mutype eq "HTML"} {
287
+@ set x "<nowiki>\n[string trimright $comment]\n</nowiki>"
288
+@ } elseif {$mutype eq "Plain Text"} {
289
+@ set r [randhex]
290
+@ set x "<verbatim-$r>\n[string trimright $comment]\n</verbatim-$r>"
291
+@ } elseif {$mutype eq {[links only]}} {
292
+@ set r [randhex]
293
+@ set x [string trimright $comment]
294
+@ set x "<verbatim-$r links>\n$x\n</verbatim-$r>"
295
+@ } else {
296
+@ set x $comment
297
+@ }
298
+@ set comment "$ctxt\n$x"
284299
@ submit_ticket
285300
@ }
286301
@ </th1>
287302
@ <h1 style="text-align: center;">Enter A New Ticket</h1>
288303
@ <table cellpadding="5">
289304
@ <tr>
290
-@ <td colspan="2">
305
+@ <td colspan="3">
291306
@ Enter a one-line summary of the ticket:<br />
292307
@ <input type="text" name="title" size="60" value="$<title>" />
293308
@ </td>
294309
@ </tr>
295310
@
296311
@ <tr>
297
-@ <td style="text-align: center;">Type:
298
-@ <th1>combobox type $type_choices 1</th1>
299
-@ </td>
300
-@ <td>What type of ticket is this?</td>
312
+@ <td align="right">Type:</td>
313
+@ <td align="left"><th1>combobox type $type_choices 1</th1></td>
314
+@ <td align="left">What type of ticket is this?</td>
301315
@ </tr>
302316
@
303317
@ <tr>
304
-@ <td style="text-align: center;">Version:
318
+@ <td align="right">Version:</td>
319
+@ <td align="left">
305320
@ <input type="text" name="foundin" size="20" value="$<foundin>" />
306321
@ </td>
307
-@ <td>In what version or build number do you observe the problem?</td>
322
+@ <td align="left">In what version or build number do you observe
323
+@ the problem?</td>
308324
@ </tr>
309325
@
310326
@ <tr>
311
-@ <td style="text-align: center;">Severity:
312
-@ <th1>combobox severity $severity_choices 1</th1>
313
-@ </td>
314
-@ <td>How debilitating is the problem? How badly does the problem
327
+@ <td align="right">Severity:</td>
328
+@ <td align="left"><th1>combobox severity $severity_choices 1</th1></td>
329
+@ <td align="left">How debilitating is the problem? How badly does the problem
315330
@ affect the operation of the product?</td>
316331
@ </tr>
317332
@
318333
@ <tr>
319
-@ <td style="text-align: center;">EMail:
320
-@ <input type="text" name="private_contact" value="$<private_contact>" size="30" />
334
+@ <td align="right">EMail:</td>
335
+@ <td align="left">
336
+@ <input type="text" name="private_contact" value="$<private_contact>"
337
+@ size="30" />
321338
@ </td>
322
-@ <td><span style="text-decoration: underline;">Not publicly visible</span>.
339
+@ <td align="left"><u>Not publicly visible</u>
323340
@ Used by developers to contact you with questions.</td>
324341
@ </tr>
325342
@
326343
@ <tr>
327
-@ <td colspan="2">
344
+@ <td colspan="3">
328345
@ Enter a detailed description of the problem.
329346
@ For code defects, be sure to provide details on exactly how
330347
@ the problem can be reproduced. Provide as much detail as
331
-@ possible.
348
+@ possible. Format:
349
+@ <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1>
332350
@ <br />
333351
@ <th1>set nline [linecount $comment 50 10]</th1>
334352
@ <textarea name="comment" cols="80" rows="$nline"
335353
@ wrap="virtual" class="wikiedit">$<comment></textarea><br />
336
-@ <input type="submit" name="preview" value="Preview" /></td>
337354
@ </tr>
338
-@
339
-@ <th1>enable_output [info exists preview]</th1>
340
-@ <tr><td colspan="2">
355
+@
356
+@ <th1>enable_output A [info exists preview]</th1>
357
+@ <tr><td colspan="3">
341358
@ Description Preview:<br /><hr />
342
-@ <th1>wiki $comment</th1>
343
-@ <hr />
344
-@ </td></tr>
345
-@ <th1>enable_output 1</th1>
359
+@ <th1>
360
+@ if {$mutype eq "Wiki"} {
361
+@ wiki $comment
362
+@ } elseif {$mutype eq "Plain Text"} {
363
+@ set r [randhex]
364
+@ wiki "<verbatim-$r>\n[string trimright $comment]\n</verbatim-$r>"
365
+@ } elseif {$mutype eq {[links only]}} {
366
+@ set r [randhex]
367
+@ wiki "<verbatim-$r links>\n[string trimright $comment]\n</verbatim-$r>"
368
+@ } else {
369
+@ wiki "<nowiki>\n[string trimright $comment]\n</nowiki>"
370
+@ }
371
+@ </th1>
372
+@ <hr /></td></tr>
373
+@ <th1>enable_output B 1</th1>
374
+@
375
+@ <tr>
376
+@ <td><td align="left">
377
+@ <input type="submit" name="preview" value="Preview" />
378
+@ </td>
379
+@ <td align="left">See how the description will appear after formatting.</td>
380
+@ </tr>
346381
@
382
+@ <th1>enable_output C [info exists preview]</th1>
347383
@ <tr>
348
-@ <td style="text-align: center;">
384
+@ <td><td align="left">
349385
@ <input type="submit" name="submit" value="Submit" />
350386
@ </td>
351
-@ <td>After filling in the information above, press this button to create
352
-@ the new ticket</td>
387
+@ <td align="left">After filling in the information above, press this
388
+@ button to create the new ticket</td>
353389
@ </tr>
390
+@ <th1>enable_output D 1</th1>
391
+@
354392
@ <tr>
355
-@ <td style="text-align: center;">
393
+@ <td><td align="left">
356394
@ <input type="submit" name="cancel" value="Cancel" />
357395
@ </td>
358396
@ <td>Abandon and forget this ticket</td>
359397
@ </tr>
360398
@ </table>
@@ -390,11 +428,11 @@
390428
@ <table cellpadding="5">
391429
@ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
392430
@ <td class="tktDspValue" colspan="3">$<tkt_uuid></td></tr>
393431
@ <tr><td class="tktDspLabel">Title:</td>
394432
@ <td class="tktDspValue" colspan="3">
395
-@ <th1>wiki $title</th1>
433
+@ $<title>
396434
@ </td></tr>
397435
@ <tr><td class="tktDspLabel">Status:</td><td class="tktDspValue">
398436
@ $<status>
399437
@ </td>
400438
@ <td class="tktDspLabel">Type:</td><td class="tktDspValue">
@@ -424,12 +462,19 @@
424462
@ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
425463
@ <td colspan="3" valign="top" class="tktDspValue">
426464
@ $<foundin>
427465
@ </td></tr>
428466
@ <tr><td>Description &amp; Comments:</td></tr>
429
-@ <tr><td colspan="4" class="tktDspValue">
430
-@ <th1>wiki $comment</th1>
467
+@ <tr><td colspan="5" class="tktDspValue">
468
+@ <th1>
469
+@ if {[info exists plaintext]} {
470
+@ set r [randhex]
471
+@ wiki "<verbatim-$r links>\n$comment\n</verbatim-$r>"
472
+@ } else {
473
+@ wiki $comment
474
+@ }
475
+@ </th1>
431476
@ </td></tr>
432477
@ </table>
433478
;
434479
435480
@@ -458,102 +503,172 @@
458503
);
459504
}
460505
461506
static const char zDefaultEdit[] =
462507
@ <th1>
508
+@ if {![info exists mutype]} {set mutype {[links only]}}
463509
@ if {![info exists username]} {set username $login}
464510
@ if {[info exists submit]} {
465511
@ if {[info exists cmappnd]} {
466512
@ if {[string length $cmappnd]>0} {
467
-@ set ctxt "\n\n<hr /><i>[htmlize $login]"
513
+@ set ctxt "\n\n<hr />\n<i>[htmlize $login]"
468514
@ if {$username ne $login} {
469515
@ set ctxt "$ctxt claiming to be [htmlize $username]"
470516
@ }
471
-@ set ctxt "$ctxt added on [date] UTC:</i><br />\n$cmappnd"
472
-@ append_field comment $ctxt
517
+@ set ctxt "$ctxt added on [date] UTC:</i><br />"
518
+@ if {$mutype eq "Plain Text"} {
519
+@ set r [randhex]
520
+@ set x "<verbatim-$r>\n[string trimright $cmappnd]\n</verbatim-$r>"
521
+@ } elseif {$mutype eq {[links only]}} {
522
+@ set r [randhex]
523
+@ set x [string trimright $cmappnd]
524
+@ set x "<verbatim-$r links>\n$x\n</verbatim-$r>"
525
+@ } elseif {$mutype eq "HTML"} {
526
+@ set x "<nowiki>\n[string trimright $cmappnd]\n</nowiki>"
527
+@ } else {
528
+@ set x $cmappnd
529
+@ }
530
+@ append_field comment "$ctxt\n$x\n"
473531
@ }
474532
@ }
475533
@ submit_ticket
476534
@ }
477535
@ </th1>
478536
@ <table cellpadding="5">
479537
@ <tr><td class="tktDspLabel">Title:</td><td>
480538
@ <input type="text" name="title" value="$<title>" size="60" />
481539
@ </td></tr>
540
+@
482541
@ <tr><td class="tktDspLabel">Status:</td><td>
483542
@ <th1>combobox status $status_choices 1</th1>
484543
@ </td></tr>
544
+@
485545
@ <tr><td class="tktDspLabel">Type:</td><td>
486546
@ <th1>combobox type $type_choices 1</th1>
487547
@ </td></tr>
548
+@
488549
@ <tr><td class="tktDspLabel">Severity:</td><td>
489550
@ <th1>combobox severity $severity_choices 1</th1>
490551
@ </td></tr>
552
+@
491553
@ <tr><td class="tktDspLabel">Priority:</td><td>
492554
@ <th1>combobox priority $priority_choices 1</th1>
493555
@ </td></tr>
556
+@
494557
@ <tr><td class="tktDspLabel">Resolution:</td><td>
495558
@ <th1>combobox resolution $resolution_choices 1</th1>
496559
@ </td></tr>
560
+@
497561
@ <tr><td class="tktDspLabel">Subsystem:</td><td>
498562
@ <th1>combobox subsystem $subsystem_choices 1</th1>
499563
@ </td></tr>
564
+@
500565
@ <th1>enable_output [hascap e]</th1>
501566
@ <tr><td class="tktDspLabel">Contact:</td><td>
502567
@ <input type="text" name="private_contact" size="40"
503568
@ value="$<private_contact>" />
504569
@ </td></tr>
505570
@ <th1>enable_output 1</th1>
571
+@
506572
@ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td><td>
507573
@ <input type="text" name="foundin" size="50" value="$<foundin>" />
508574
@ </td></tr>
509
-@ <tr><td colspan="2">
575
+@
510576
@ <th1>
511577
@ if {![info exists eall]} {set eall 0}
512578
@ if {[info exists aonlybtn]} {set eall 0}
513579
@ if {[info exists eallbtn]} {set eall 1}
514580
@ if {![hascap w]} {set eall 0}
515581
@ if {![info exists cmappnd]} {set cmappnd {}}
516582
@ set nline [linecount $comment 15 10]
517583
@ enable_output $eall
518584
@ </th1>
519
-@ Description And Comments:<br />
585
+@
586
+@ <tr><td colspan="2">
587
+@ Description And Comments: (Format is "Wiki" or text/x-fossil-wiki)<br />
520588
@ <textarea name="comment" cols="80" rows="$nline"
521589
@ wrap="virtual" class="wikiedit">$<comment></textarea><br />
522590
@ <input type="hidden" name="eall" value="1" />
523
-@ <input type="submit" name="aonlybtn" value="Append Remark" />
524
-@ <input type="submit" name="preview1btn" value="Preview" />
591
+@ <input type="hidden" name="mutype" value="$<mutype>" />
592
+@ </td></tr>
593
+@
525594
@ <th1>enable_output [expr {!$eall}]</th1>
526
-@ Append Remark from
595
+@ <tr><td colspan="2">
596
+@ Append Remark with format
597
+@ <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1>
598
+@ from
527599
@ <input type="text" name="username" value="$<username>" size="30" />:<br />
528600
@ <textarea name="cmappnd" cols="80" rows="15"
529
-@ wrap="virtual" class="wikiedit">$<cmappnd></textarea><br />
530
-@ <th1>enable_output [expr {[hascap w] && !$eall}]</th1>
531
-@ <input type="submit" name="eallbtn" value="Edit All" />
532
-@ <th1>enable_output [expr {!$eall}]</th1>
533
-@ <input type="submit" name="preview2btn" value="Preview" />
534
-@ <th1>enable_output 1</th1>
535
-@ </td></tr>
536
-@
537
-@ <th1>enable_output [info exists preview1btn]</th1>
538
-@ <tr><td colspan="2">
539
-@ Description Preview:<br /><hr />
540
-@ <th1>wiki $comment</th1>
541
-@ <hr />
542
-@ </td></tr>
543
-@ <th1>enable_output [info exists preview2btn]</th1>
544
-@ <tr><td colspan="2">
545
-@ Description Preview:<br /><hr />
546
-@ <th1>wiki $cmappnd</th1>
547
-@ <hr />
548
-@ </td></tr>
549
-@ <th1>enable_output 1</th1>
550
-@
551
-@ <tr><td align="right"></td><td>
552
-@ <input type="submit" name="submit" value="Submit Changes" />
553
-@ <input type="submit" name="cancel" value="Cancel" />
554
-@ </td></tr>
601
+@ wrap="virtual" class="wikiedit">$<cmappnd></textarea>
602
+@ </td></tr>
603
+@ <th1>enable_output 1</th1>
604
+@
605
+@ <th1>enable_output [info exists preview]</th1>
606
+@ <tr><td colspan="2">
607
+@ Description Preview:<br><hr>
608
+@ <th1>
609
+@ if {$eall} {
610
+@ wiki $comment
611
+@ } elseif {$mutype eq "Wiki"} {
612
+@ wiki $cmappnd
613
+@ } elseif {$mutype eq "Plain Text"} {
614
+@ set r [randhex]
615
+@ wiki "<verbatim-$r>\n[string trimright $cmappnd]\n</verbatim-$r>"
616
+@ } elseif {$mutype eq {[links only]}} {
617
+@ set r [randhex]
618
+@ wiki "<verbatim-$r links>\n[string trimright $cmappnd]</verbatim-$r>"
619
+@ } else {
620
+@ wiki "<nowiki>\n[string trimright $cmappnd]</nowiki>"
621
+@ }
622
+@ </th1>
623
+@ <hr>
624
+@ </td></tr>
625
+@ <th1>enable_output 1</th1>
626
+@
627
+@
628
+@ <th1>enable_output [expr {[hascap w] && !$eall}]</th1>
629
+@ <tr>
630
+@ <td align="right">
631
+@ <input type="submit" name="eallbtn" value="Edit All" />
632
+@ </td>
633
+@ <td align="left">Edit the entire description history</td>
634
+@ </tr>
635
+@
636
+@
637
+@ <th1>enable_output $eall</th1>
638
+@ <tr>
639
+@ <td align="right">
640
+@ <input type="submit" name="aonlybtn" value="Append Only" />
641
+@ </td>
642
+@ <td align="left">Append a remark to the end of the description, leaving
643
+@ prior description text unchanged.</td>
644
+@ </tr>
645
+@
646
+@ <th1>enable_output 1</th1>
647
+@ <tr>
648
+@ <td align="right">
649
+@ <input type="submit" name="preview" value="Preview" />
650
+@ </td>
651
+@ <td align="left">See how the description will appear after formatting.</td>
652
+@ </tr>
653
+@
654
+@ <th1>enable_output [info exists preview]</th1>
655
+@ <tr>
656
+@ <td align="right">
657
+@ <input type="submit" name="submit" value="Submit" />
658
+@ </td>
659
+@ <td align="left">Apply the changes shown above</td>
660
+@ </tr>
661
+@ <th1>enable_output 1</th1>
662
+@
663
+@ <tr>
664
+@ <td align="right">
665
+@ <input type="submit" name="cancel" value="Cancel" />
666
+@ </td>
667
+@ <td>Abandon this edit</td>
668
+@ </tr>
669
+@
555670
@ </table>
556671
;
557672
558673
/*
559674
** Return the code used to generate the edit ticket page
560675
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -277,84 +277,122 @@
277 );
278 }
279
280 static const char zDefaultNew[] =
281 @ <th1>
 
282 @ if {[info exists submit]} {
283 @ set status Open
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284 @ submit_ticket
285 @ }
286 @ </th1>
287 @ <h1 style="text-align: center;">Enter A New Ticket</h1>
288 @ <table cellpadding="5">
289 @ <tr>
290 @ <td colspan="2">
291 @ Enter a one-line summary of the ticket:<br />
292 @ <input type="text" name="title" size="60" value="$<title>" />
293 @ </td>
294 @ </tr>
295 @
296 @ <tr>
297 @ <td style="text-align: center;">Type:
298 @ <th1>combobox type $type_choices 1</th1>
299 @ </td>
300 @ <td>What type of ticket is this?</td>
301 @ </tr>
302 @
303 @ <tr>
304 @ <td style="text-align: center;">Version:
 
305 @ <input type="text" name="foundin" size="20" value="$<foundin>" />
306 @ </td>
307 @ <td>In what version or build number do you observe the problem?</td>
 
308 @ </tr>
309 @
310 @ <tr>
311 @ <td style="text-align: center;">Severity:
312 @ <th1>combobox severity $severity_choices 1</th1>
313 @ </td>
314 @ <td>How debilitating is the problem? How badly does the problem
315 @ affect the operation of the product?</td>
316 @ </tr>
317 @
318 @ <tr>
319 @ <td style="text-align: center;">EMail:
320 @ <input type="text" name="private_contact" value="$<private_contact>" size="30" />
 
 
321 @ </td>
322 @ <td><span style="text-decoration: underline;">Not publicly visible</span>.
323 @ Used by developers to contact you with questions.</td>
324 @ </tr>
325 @
326 @ <tr>
327 @ <td colspan="2">
328 @ Enter a detailed description of the problem.
329 @ For code defects, be sure to provide details on exactly how
330 @ the problem can be reproduced. Provide as much detail as
331 @ possible.
 
332 @ <br />
333 @ <th1>set nline [linecount $comment 50 10]</th1>
334 @ <textarea name="comment" cols="80" rows="$nline"
335 @ wrap="virtual" class="wikiedit">$<comment></textarea><br />
336 @ <input type="submit" name="preview" value="Preview" /></td>
337 @ </tr>
338 @
339 @ <th1>enable_output [info exists preview]</th1>
340 @ <tr><td colspan="2">
341 @ Description Preview:<br /><hr />
342 @ <th1>wiki $comment</th1>
343 @ <hr />
344 @ </td></tr>
345 @ <th1>enable_output 1</th1>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346 @
 
347 @ <tr>
348 @ <td style="text-align: center;">
349 @ <input type="submit" name="submit" value="Submit" />
350 @ </td>
351 @ <td>After filling in the information above, press this button to create
352 @ the new ticket</td>
353 @ </tr>
 
 
354 @ <tr>
355 @ <td style="text-align: center;">
356 @ <input type="submit" name="cancel" value="Cancel" />
357 @ </td>
358 @ <td>Abandon and forget this ticket</td>
359 @ </tr>
360 @ </table>
@@ -390,11 +428,11 @@
390 @ <table cellpadding="5">
391 @ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
392 @ <td class="tktDspValue" colspan="3">$<tkt_uuid></td></tr>
393 @ <tr><td class="tktDspLabel">Title:</td>
394 @ <td class="tktDspValue" colspan="3">
395 @ <th1>wiki $title</th1>
396 @ </td></tr>
397 @ <tr><td class="tktDspLabel">Status:</td><td class="tktDspValue">
398 @ $<status>
399 @ </td>
400 @ <td class="tktDspLabel">Type:</td><td class="tktDspValue">
@@ -424,12 +462,19 @@
424 @ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
425 @ <td colspan="3" valign="top" class="tktDspValue">
426 @ $<foundin>
427 @ </td></tr>
428 @ <tr><td>Description &amp; Comments:</td></tr>
429 @ <tr><td colspan="4" class="tktDspValue">
430 @ <th1>wiki $comment</th1>
 
 
 
 
 
 
 
431 @ </td></tr>
432 @ </table>
433 ;
434
435
@@ -458,102 +503,172 @@
458 );
459 }
460
461 static const char zDefaultEdit[] =
462 @ <th1>
 
463 @ if {![info exists username]} {set username $login}
464 @ if {[info exists submit]} {
465 @ if {[info exists cmappnd]} {
466 @ if {[string length $cmappnd]>0} {
467 @ set ctxt "\n\n<hr /><i>[htmlize $login]"
468 @ if {$username ne $login} {
469 @ set ctxt "$ctxt claiming to be [htmlize $username]"
470 @ }
471 @ set ctxt "$ctxt added on [date] UTC:</i><br />\n$cmappnd"
472 @ append_field comment $ctxt
 
 
 
 
 
 
 
 
 
 
 
 
473 @ }
474 @ }
475 @ submit_ticket
476 @ }
477 @ </th1>
478 @ <table cellpadding="5">
479 @ <tr><td class="tktDspLabel">Title:</td><td>
480 @ <input type="text" name="title" value="$<title>" size="60" />
481 @ </td></tr>
 
482 @ <tr><td class="tktDspLabel">Status:</td><td>
483 @ <th1>combobox status $status_choices 1</th1>
484 @ </td></tr>
 
485 @ <tr><td class="tktDspLabel">Type:</td><td>
486 @ <th1>combobox type $type_choices 1</th1>
487 @ </td></tr>
 
488 @ <tr><td class="tktDspLabel">Severity:</td><td>
489 @ <th1>combobox severity $severity_choices 1</th1>
490 @ </td></tr>
 
491 @ <tr><td class="tktDspLabel">Priority:</td><td>
492 @ <th1>combobox priority $priority_choices 1</th1>
493 @ </td></tr>
 
494 @ <tr><td class="tktDspLabel">Resolution:</td><td>
495 @ <th1>combobox resolution $resolution_choices 1</th1>
496 @ </td></tr>
 
497 @ <tr><td class="tktDspLabel">Subsystem:</td><td>
498 @ <th1>combobox subsystem $subsystem_choices 1</th1>
499 @ </td></tr>
 
500 @ <th1>enable_output [hascap e]</th1>
501 @ <tr><td class="tktDspLabel">Contact:</td><td>
502 @ <input type="text" name="private_contact" size="40"
503 @ value="$<private_contact>" />
504 @ </td></tr>
505 @ <th1>enable_output 1</th1>
 
506 @ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td><td>
507 @ <input type="text" name="foundin" size="50" value="$<foundin>" />
508 @ </td></tr>
509 @ <tr><td colspan="2">
510 @ <th1>
511 @ if {![info exists eall]} {set eall 0}
512 @ if {[info exists aonlybtn]} {set eall 0}
513 @ if {[info exists eallbtn]} {set eall 1}
514 @ if {![hascap w]} {set eall 0}
515 @ if {![info exists cmappnd]} {set cmappnd {}}
516 @ set nline [linecount $comment 15 10]
517 @ enable_output $eall
518 @ </th1>
519 @ Description And Comments:<br />
 
 
520 @ <textarea name="comment" cols="80" rows="$nline"
521 @ wrap="virtual" class="wikiedit">$<comment></textarea><br />
522 @ <input type="hidden" name="eall" value="1" />
523 @ <input type="submit" name="aonlybtn" value="Append Remark" />
524 @ <input type="submit" name="preview1btn" value="Preview" />
 
525 @ <th1>enable_output [expr {!$eall}]</th1>
526 @ Append Remark from
 
 
 
527 @ <input type="text" name="username" value="$<username>" size="30" />:<br />
528 @ <textarea name="cmappnd" cols="80" rows="15"
529 @ wrap="virtual" class="wikiedit">$<cmappnd></textarea><br />
530 @ <th1>enable_output [expr {[hascap w] && !$eall}]</th1>
531 @ <input type="submit" name="eallbtn" value="Edit All" />
532 @ <th1>enable_output [expr {!$eall}]</th1>
533 @ <input type="submit" name="preview2btn" value="Preview" />
534 @ <th1>enable_output 1</th1>
535 @ </td></tr>
536 @
537 @ <th1>enable_output [info exists preview1btn]</th1>
538 @ <tr><td colspan="2">
539 @ Description Preview:<br /><hr />
540 @ <th1>wiki $comment</th1>
541 @ <hr />
542 @ </td></tr>
543 @ <th1>enable_output [info exists preview2btn]</th1>
544 @ <tr><td colspan="2">
545 @ Description Preview:<br /><hr />
546 @ <th1>wiki $cmappnd</th1>
547 @ <hr />
548 @ </td></tr>
549 @ <th1>enable_output 1</th1>
550 @
551 @ <tr><td align="right"></td><td>
552 @ <input type="submit" name="submit" value="Submit Changes" />
553 @ <input type="submit" name="cancel" value="Cancel" />
554 @ </td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555 @ </table>
556 ;
557
558 /*
559 ** Return the code used to generate the edit ticket page
560
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -277,84 +277,122 @@
277 );
278 }
279
280 static const char zDefaultNew[] =
281 @ <th1>
282 @ if {![info exists mutype]} {set mutype {[links only]}}
283 @ if {[info exists submit]} {
284 @ set status Open
285 @ set ctxt "<i>By [htmlize $login] on [date] UTC:</i><br />"
286 @ if {$mutype eq "HTML"} {
287 @ set x "<nowiki>\n[string trimright $comment]\n</nowiki>"
288 @ } elseif {$mutype eq "Plain Text"} {
289 @ set r [randhex]
290 @ set x "<verbatim-$r>\n[string trimright $comment]\n</verbatim-$r>"
291 @ } elseif {$mutype eq {[links only]}} {
292 @ set r [randhex]
293 @ set x [string trimright $comment]
294 @ set x "<verbatim-$r links>\n$x\n</verbatim-$r>"
295 @ } else {
296 @ set x $comment
297 @ }
298 @ set comment "$ctxt\n$x"
299 @ submit_ticket
300 @ }
301 @ </th1>
302 @ <h1 style="text-align: center;">Enter A New Ticket</h1>
303 @ <table cellpadding="5">
304 @ <tr>
305 @ <td colspan="3">
306 @ Enter a one-line summary of the ticket:<br />
307 @ <input type="text" name="title" size="60" value="$<title>" />
308 @ </td>
309 @ </tr>
310 @
311 @ <tr>
312 @ <td align="right">Type:</td>
313 @ <td align="left"><th1>combobox type $type_choices 1</th1></td>
314 @ <td align="left">What type of ticket is this?</td>
 
315 @ </tr>
316 @
317 @ <tr>
318 @ <td align="right">Version:</td>
319 @ <td align="left">
320 @ <input type="text" name="foundin" size="20" value="$<foundin>" />
321 @ </td>
322 @ <td align="left">In what version or build number do you observe
323 @ the problem?</td>
324 @ </tr>
325 @
326 @ <tr>
327 @ <td align="right">Severity:</td>
328 @ <td align="left"><th1>combobox severity $severity_choices 1</th1></td>
329 @ <td align="left">How debilitating is the problem? How badly does the problem
 
330 @ affect the operation of the product?</td>
331 @ </tr>
332 @
333 @ <tr>
334 @ <td align="right">EMail:</td>
335 @ <td align="left">
336 @ <input type="text" name="private_contact" value="$<private_contact>"
337 @ size="30" />
338 @ </td>
339 @ <td align="left"><u>Not publicly visible</u>
340 @ Used by developers to contact you with questions.</td>
341 @ </tr>
342 @
343 @ <tr>
344 @ <td colspan="3">
345 @ Enter a detailed description of the problem.
346 @ For code defects, be sure to provide details on exactly how
347 @ the problem can be reproduced. Provide as much detail as
348 @ possible. Format:
349 @ <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1>
350 @ <br />
351 @ <th1>set nline [linecount $comment 50 10]</th1>
352 @ <textarea name="comment" cols="80" rows="$nline"
353 @ wrap="virtual" class="wikiedit">$<comment></textarea><br />
 
354 @ </tr>
355 @
356 @ <th1>enable_output A [info exists preview]</th1>
357 @ <tr><td colspan="3">
358 @ Description Preview:<br /><hr />
359 @ <th1>
360 @ if {$mutype eq "Wiki"} {
361 @ wiki $comment
362 @ } elseif {$mutype eq "Plain Text"} {
363 @ set r [randhex]
364 @ wiki "<verbatim-$r>\n[string trimright $comment]\n</verbatim-$r>"
365 @ } elseif {$mutype eq {[links only]}} {
366 @ set r [randhex]
367 @ wiki "<verbatim-$r links>\n[string trimright $comment]\n</verbatim-$r>"
368 @ } else {
369 @ wiki "<nowiki>\n[string trimright $comment]\n</nowiki>"
370 @ }
371 @ </th1>
372 @ <hr /></td></tr>
373 @ <th1>enable_output B 1</th1>
374 @
375 @ <tr>
376 @ <td><td align="left">
377 @ <input type="submit" name="preview" value="Preview" />
378 @ </td>
379 @ <td align="left">See how the description will appear after formatting.</td>
380 @ </tr>
381 @
382 @ <th1>enable_output C [info exists preview]</th1>
383 @ <tr>
384 @ <td><td align="left">
385 @ <input type="submit" name="submit" value="Submit" />
386 @ </td>
387 @ <td align="left">After filling in the information above, press this
388 @ button to create the new ticket</td>
389 @ </tr>
390 @ <th1>enable_output D 1</th1>
391 @
392 @ <tr>
393 @ <td><td align="left">
394 @ <input type="submit" name="cancel" value="Cancel" />
395 @ </td>
396 @ <td>Abandon and forget this ticket</td>
397 @ </tr>
398 @ </table>
@@ -390,11 +428,11 @@
428 @ <table cellpadding="5">
429 @ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
430 @ <td class="tktDspValue" colspan="3">$<tkt_uuid></td></tr>
431 @ <tr><td class="tktDspLabel">Title:</td>
432 @ <td class="tktDspValue" colspan="3">
433 @ $<title>
434 @ </td></tr>
435 @ <tr><td class="tktDspLabel">Status:</td><td class="tktDspValue">
436 @ $<status>
437 @ </td>
438 @ <td class="tktDspLabel">Type:</td><td class="tktDspValue">
@@ -424,12 +462,19 @@
462 @ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td>
463 @ <td colspan="3" valign="top" class="tktDspValue">
464 @ $<foundin>
465 @ </td></tr>
466 @ <tr><td>Description &amp; Comments:</td></tr>
467 @ <tr><td colspan="5" class="tktDspValue">
468 @ <th1>
469 @ if {[info exists plaintext]} {
470 @ set r [randhex]
471 @ wiki "<verbatim-$r links>\n$comment\n</verbatim-$r>"
472 @ } else {
473 @ wiki $comment
474 @ }
475 @ </th1>
476 @ </td></tr>
477 @ </table>
478 ;
479
480
@@ -458,102 +503,172 @@
503 );
504 }
505
506 static const char zDefaultEdit[] =
507 @ <th1>
508 @ if {![info exists mutype]} {set mutype {[links only]}}
509 @ if {![info exists username]} {set username $login}
510 @ if {[info exists submit]} {
511 @ if {[info exists cmappnd]} {
512 @ if {[string length $cmappnd]>0} {
513 @ set ctxt "\n\n<hr />\n<i>[htmlize $login]"
514 @ if {$username ne $login} {
515 @ set ctxt "$ctxt claiming to be [htmlize $username]"
516 @ }
517 @ set ctxt "$ctxt added on [date] UTC:</i><br />"
518 @ if {$mutype eq "Plain Text"} {
519 @ set r [randhex]
520 @ set x "<verbatim-$r>\n[string trimright $cmappnd]\n</verbatim-$r>"
521 @ } elseif {$mutype eq {[links only]}} {
522 @ set r [randhex]
523 @ set x [string trimright $cmappnd]
524 @ set x "<verbatim-$r links>\n$x\n</verbatim-$r>"
525 @ } elseif {$mutype eq "HTML"} {
526 @ set x "<nowiki>\n[string trimright $cmappnd]\n</nowiki>"
527 @ } else {
528 @ set x $cmappnd
529 @ }
530 @ append_field comment "$ctxt\n$x\n"
531 @ }
532 @ }
533 @ submit_ticket
534 @ }
535 @ </th1>
536 @ <table cellpadding="5">
537 @ <tr><td class="tktDspLabel">Title:</td><td>
538 @ <input type="text" name="title" value="$<title>" size="60" />
539 @ </td></tr>
540 @
541 @ <tr><td class="tktDspLabel">Status:</td><td>
542 @ <th1>combobox status $status_choices 1</th1>
543 @ </td></tr>
544 @
545 @ <tr><td class="tktDspLabel">Type:</td><td>
546 @ <th1>combobox type $type_choices 1</th1>
547 @ </td></tr>
548 @
549 @ <tr><td class="tktDspLabel">Severity:</td><td>
550 @ <th1>combobox severity $severity_choices 1</th1>
551 @ </td></tr>
552 @
553 @ <tr><td class="tktDspLabel">Priority:</td><td>
554 @ <th1>combobox priority $priority_choices 1</th1>
555 @ </td></tr>
556 @
557 @ <tr><td class="tktDspLabel">Resolution:</td><td>
558 @ <th1>combobox resolution $resolution_choices 1</th1>
559 @ </td></tr>
560 @
561 @ <tr><td class="tktDspLabel">Subsystem:</td><td>
562 @ <th1>combobox subsystem $subsystem_choices 1</th1>
563 @ </td></tr>
564 @
565 @ <th1>enable_output [hascap e]</th1>
566 @ <tr><td class="tktDspLabel">Contact:</td><td>
567 @ <input type="text" name="private_contact" size="40"
568 @ value="$<private_contact>" />
569 @ </td></tr>
570 @ <th1>enable_output 1</th1>
571 @
572 @ <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td><td>
573 @ <input type="text" name="foundin" size="50" value="$<foundin>" />
574 @ </td></tr>
575 @
576 @ <th1>
577 @ if {![info exists eall]} {set eall 0}
578 @ if {[info exists aonlybtn]} {set eall 0}
579 @ if {[info exists eallbtn]} {set eall 1}
580 @ if {![hascap w]} {set eall 0}
581 @ if {![info exists cmappnd]} {set cmappnd {}}
582 @ set nline [linecount $comment 15 10]
583 @ enable_output $eall
584 @ </th1>
585 @
586 @ <tr><td colspan="2">
587 @ Description And Comments: (Format is "Wiki" or text/x-fossil-wiki)<br />
588 @ <textarea name="comment" cols="80" rows="$nline"
589 @ wrap="virtual" class="wikiedit">$<comment></textarea><br />
590 @ <input type="hidden" name="eall" value="1" />
591 @ <input type="hidden" name="mutype" value="$<mutype>" />
592 @ </td></tr>
593 @
594 @ <th1>enable_output [expr {!$eall}]</th1>
595 @ <tr><td colspan="2">
596 @ Append Remark with format
597 @ <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1>
598 @ from
599 @ <input type="text" name="username" value="$<username>" size="30" />:<br />
600 @ <textarea name="cmappnd" cols="80" rows="15"
601 @ wrap="virtual" class="wikiedit">$<cmappnd></textarea>
602 @ </td></tr>
603 @ <th1>enable_output 1</th1>
604 @
605 @ <th1>enable_output [info exists preview]</th1>
606 @ <tr><td colspan="2">
607 @ Description Preview:<br><hr>
608 @ <th1>
609 @ if {$eall} {
610 @ wiki $comment
611 @ } elseif {$mutype eq "Wiki"} {
612 @ wiki $cmappnd
613 @ } elseif {$mutype eq "Plain Text"} {
614 @ set r [randhex]
615 @ wiki "<verbatim-$r>\n[string trimright $cmappnd]\n</verbatim-$r>"
616 @ } elseif {$mutype eq {[links only]}} {
617 @ set r [randhex]
618 @ wiki "<verbatim-$r links>\n[string trimright $cmappnd]</verbatim-$r>"
619 @ } else {
620 @ wiki "<nowiki>\n[string trimright $cmappnd]</nowiki>"
621 @ }
622 @ </th1>
623 @ <hr>
624 @ </td></tr>
625 @ <th1>enable_output 1</th1>
626 @
627 @
628 @ <th1>enable_output [expr {[hascap w] && !$eall}]</th1>
629 @ <tr>
630 @ <td align="right">
631 @ <input type="submit" name="eallbtn" value="Edit All" />
632 @ </td>
633 @ <td align="left">Edit the entire description history</td>
634 @ </tr>
635 @
636 @
637 @ <th1>enable_output $eall</th1>
638 @ <tr>
639 @ <td align="right">
640 @ <input type="submit" name="aonlybtn" value="Append Only" />
641 @ </td>
642 @ <td align="left">Append a remark to the end of the description, leaving
643 @ prior description text unchanged.</td>
644 @ </tr>
645 @
646 @ <th1>enable_output 1</th1>
647 @ <tr>
648 @ <td align="right">
649 @ <input type="submit" name="preview" value="Preview" />
650 @ </td>
651 @ <td align="left">See how the description will appear after formatting.</td>
652 @ </tr>
653 @
654 @ <th1>enable_output [info exists preview]</th1>
655 @ <tr>
656 @ <td align="right">
657 @ <input type="submit" name="submit" value="Submit" />
658 @ </td>
659 @ <td align="left">Apply the changes shown above</td>
660 @ </tr>
661 @ <th1>enable_output 1</th1>
662 @
663 @ <tr>
664 @ <td align="right">
665 @ <input type="submit" name="cancel" value="Cancel" />
666 @ </td>
667 @ <td>Abandon this edit</td>
668 @ </tr>
669 @
670 @ </table>
671 ;
672
673 /*
674 ** Return the code used to generate the edit ticket page
675

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button