| | @@ -48,12 +48,14 @@ |
| 48 | 48 | "HTML with embedded TH1 code for the \"new ticket\" webpage."); |
| 49 | 49 | setup_menu_entry("View Ticket Page", "tktsetup_viewpage", |
| 50 | 50 | "HTML with embedded TH1 code for the \"view ticket\" webpage."); |
| 51 | 51 | setup_menu_entry("Edit Ticket Page", "tktsetup_editpage", |
| 52 | 52 | "HTML with embedded TH1 code for the \"edit ticket\" webpage."); |
| 53 | | - setup_menu_entry("Report Format", "tktsetup_drep", |
| 53 | + setup_menu_entry("Report Template", "tktsetup_rpttplt", |
| 54 | 54 | "The default ticket report format."); |
| 55 | + setup_menu_entry("Key Template", "tktsetup_keytplt", |
| 56 | + "The default color key for reports."); |
| 55 | 57 | @ </table> |
| 56 | 58 | style_footer(); |
| 57 | 59 | } |
| 58 | 60 | |
| 59 | 61 | /* @-comment: ** */ |
| | @@ -198,11 +200,11 @@ |
| 198 | 200 | @ Drive_By_Patch |
| 199 | 201 | @ } |
| 200 | 202 | @ set status_choices { |
| 201 | 203 | @ Open |
| 202 | 204 | @ Verified |
| 203 | | -@ In_Process |
| 205 | +@ Review |
| 204 | 206 | @ Deferred |
| 205 | 207 | @ Fixed |
| 206 | 208 | @ Tested |
| 207 | 209 | @ Closed |
| 208 | 210 | @ } |
| | @@ -240,10 +242,11 @@ |
| 240 | 242 | @ if {[info exists submit]} { |
| 241 | 243 | @ set status Open |
| 242 | 244 | @ submit_ticket |
| 243 | 245 | @ } |
| 244 | 246 | @ </th1> |
| 247 | +@ <h1 align="center">Enter A New Bug Report</h1> |
| 245 | 248 | @ <table cellpadding="5"> |
| 246 | 249 | @ <tr> |
| 247 | 250 | @ <td colspan="2"> |
| 248 | 251 | @ Enter a one-line summary of the problem:<br> |
| 249 | 252 | @ <input type="text" name="title" size="60" value="$<title>"> |
| | @@ -274,11 +277,11 @@ |
| 274 | 277 | @ |
| 275 | 278 | @ <tr> |
| 276 | 279 | @ <td align="right">EMail: |
| 277 | 280 | @ <input type="text" name="contact" value="$<contact>" size="30"> |
| 278 | 281 | @ </td> |
| 279 | | -@ <td>Not publically visible. Used by developers to contact you with |
| 282 | +@ <td><u>Not publicly visible</u>. Used by developers to contact you with |
| 280 | 283 | @ questions.</td> |
| 281 | 284 | @ </tr> |
| 282 | 285 | @ |
| 283 | 286 | @ <tr> |
| 284 | 287 | @ <td colspan="2"> |
| | @@ -337,42 +340,52 @@ |
| 337 | 340 | ); |
| 338 | 341 | } |
| 339 | 342 | |
| 340 | 343 | static const char zDefaultView[] = |
| 341 | 344 | @ <table cellpadding="5"> |
| 342 | | -@ <tr><td align="right">Title:</td><td> |
| 345 | +@ <tr><td align="right">Ticket UUID:</td><td bgcolor="#d0d0d0" colspan="3"> |
| 346 | +@ $<tkt_uuid> |
| 347 | +@ </td></tr> |
| 348 | +@ <tr><td align="right">Title:</td> |
| 349 | +@ <td bgcolor="#d0d0d0" colspan="3" valign="top"> |
| 343 | 350 | @ $<title> |
| 344 | 351 | @ </td></tr> |
| 345 | | -@ <tr><td align="right">Status:</td><td> |
| 352 | +@ <tr><td align="right">Status:</td><td bgcolor="#d0d0d0"> |
| 346 | 353 | @ $<status> |
| 347 | | -@ </td></tr> |
| 348 | | -@ <tr><td align="right">Type:</td><td> |
| 354 | +@ </td> |
| 355 | +@ <td align="right">Type:</td><td bgcolor="#d0d0d0"> |
| 349 | 356 | @ $<type> |
| 350 | 357 | @ </td></tr> |
| 351 | | -@ <tr><td align="right">Severity:</td><td> |
| 358 | +@ <tr><td align="right">Severity:</td><td bgcolor="#d0d0d0"> |
| 352 | 359 | @ $<severity> |
| 353 | | -@ </td></tr> |
| 354 | | -@ <tr><td align="right">Priority:</td><td> |
| 360 | +@ </td> |
| 361 | +@ <td align="right">Priority:</td><td bgcolor="#d0d0d0"> |
| 355 | 362 | @ $<priority> |
| 356 | 363 | @ </td></tr> |
| 357 | | -@ <tr><td align="right">Resolution:</td><td> |
| 364 | +@ <tr><td align="right">Subsystem:</td><td bgcolor="#d0d0d0"> |
| 365 | +@ $<subsystem> |
| 366 | +@ </td> |
| 367 | +@ <td align="right">Resolution:</td><td bgcolor="#d0d0d0"> |
| 358 | 368 | @ $<resolution> |
| 359 | 369 | @ </td></tr> |
| 360 | | -@ <tr><td align="right">Subsystem:</td><td> |
| 361 | | -@ $<subsystem> |
| 362 | | -@ </td></tr> |
| 370 | +@ <tr><td align="right">Last Modified:</td><td bgcolor="#d0d0d0"> |
| 371 | +@ $<tkt_datetime> |
| 372 | +@ </td> |
| 363 | 373 | @ <th1>enable_output [hascap e]</th1> |
| 364 | | -@ <tr><td align="right">Contact:</td><td> |
| 374 | +@ <td align="right">Contact:</td><td bgcolor="#d0d0d0"> |
| 365 | 375 | @ $<contact> |
| 366 | | -@ </td></tr> |
| 376 | +@ </td> |
| 367 | 377 | @ <th1>enable_output 1</th1> |
| 368 | | -@ <tr><td align="right">Version Found In:</td><td> |
| 378 | +@ </tr> |
| 379 | +@ <tr><td align="right">Version Found In:</td> |
| 380 | +@ <td colspan="3" valign="top" bgcolor="#d0d0d0"> |
| 369 | 381 | @ $<foundin> |
| 370 | 382 | @ </td></tr> |
| 371 | | -@ <tr><td colspan="2"> |
| 383 | +@ <tr><td>Description & Comments:</td></tr> |
| 384 | +@ <tr><td colspan="4" bgcolor="#d0d0d0"> |
| 372 | 385 | @ Description And Comments:<br> |
| 373 | | -@ <th1>wiki $comment</th1> |
| 386 | +@ <span bgcolor="#d0d0d0"><th1>wiki $comment</th1></span> |
| 374 | 387 | @ </td></tr> |
| 375 | 388 | @ </table> |
| 376 | 389 | ; |
| 377 | 390 | |
| 378 | 391 | |
| | @@ -502,5 +515,95 @@ |
| 502 | 515 | 0, |
| 503 | 516 | 0, |
| 504 | 517 | 40 |
| 505 | 518 | ); |
| 506 | 519 | } |
| 520 | + |
| 521 | +/* |
| 522 | +** The default template ticket report format: |
| 523 | +*/ |
| 524 | +static char zDefaultReport[] = |
| 525 | +@ SELECT |
| 526 | +@ CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc' |
| 527 | +@ WHEN status='Review' THEN '#e8e8e8' |
| 528 | +@ WHEN status='Fixed' THEN '#cfe8bd' |
| 529 | +@ WHEN status='Tested' THEN '#bde5d6' |
| 530 | +@ WHEN status='Deferred' THEN '#cacae5' |
| 531 | +@ ELSE '#c8c8c8' END AS 'bgcolor', |
| 532 | +@ substr(tkt_uuid,1,10) AS '#', |
| 533 | +@ datetime(tkt_mtime) AS 'mtime', |
| 534 | +@ type, |
| 535 | +@ status, |
| 536 | +@ subsystem, |
| 537 | +@ title, |
| 538 | +@ comment AS '_comments' |
| 539 | +@ FROM ticket |
| 540 | +; |
| 541 | + |
| 542 | + |
| 543 | +/* |
| 544 | +** Return the template ticket report format: |
| 545 | +*/ |
| 546 | +char *ticket_report_template(void){ |
| 547 | + return db_get("ticket-report-template", zDefaultReport); |
| 548 | +} |
| 549 | + |
| 550 | +/* |
| 551 | +** WEBPAGE: tktsetup_rpttplt |
| 552 | +*/ |
| 553 | +void tktsetup_rpttplt_page(void){ |
| 554 | + static const char zDesc[] = |
| 555 | + @ <p>Enter the default ticket report format template. This is the |
| 556 | + @ the template report format that initial appears when creating a |
| 557 | + @ new ticket summary report.</p> |
| 558 | + ; |
| 559 | + tktsetup_generic( |
| 560 | + "Default Report Template", |
| 561 | + "ticket-report-template", |
| 562 | + zDefaultReport, |
| 563 | + zDesc, |
| 564 | + 0, |
| 565 | + 0, |
| 566 | + 20 |
| 567 | + ); |
| 568 | +} |
| 569 | + |
| 570 | +/* |
| 571 | +** The default template ticket key: |
| 572 | +*/ |
| 573 | +static const char zDefaultKey[] = |
| 574 | +@ #ffffff Key: |
| 575 | +@ #f2dcdc Active |
| 576 | +@ #e8e8e8 Review |
| 577 | +@ #cfe8bd Fixed |
| 578 | +@ #bde5d6 Tested |
| 579 | +@ #cacae5 Deferred |
| 580 | +@ #c8c8c8 Closed |
| 581 | +; |
| 582 | + |
| 583 | + |
| 584 | +/* |
| 585 | +** Return the template ticket report format: |
| 586 | +*/ |
| 587 | +const char *ticket_key_template(void){ |
| 588 | + return db_get("ticket-key-template", (char*)zDefaultKey); |
| 589 | +} |
| 590 | + |
| 591 | +/* |
| 592 | +** WEBPAGE: tktsetup_keytplt |
| 593 | +*/ |
| 594 | +void tktsetup_keytplt_page(void){ |
| 595 | + static const char zDesc[] = |
| 596 | + @ <p>Enter the default ticket report key template. This is the |
| 597 | + @ the template report format that initial appears when creating a |
| 598 | + @ new ticket summary report.</p> |
| 599 | + ; |
| 600 | + tktsetup_generic( |
| 601 | + "Default Report Template", |
| 602 | + "ticket-report-template", |
| 603 | + zDefaultReport, |
| 604 | + zDesc, |
| 605 | + 0, |
| 606 | + 0, |
| 607 | + 20 |
| 608 | + ); |
| 609 | +} |
| 507 | 610 | |