Fossil

Check-in [27d2e6e458]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More ticket processing refinements.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 27d2e6e458351e17c50e654a2a1138b4afdf1b1a
User & Date: drh 2008-05-28 19:24:58.000
Context
2008-05-29
01:58
Improvements to the shunning algorithm. Add the shun page and an opportunity to shun or unshun artifacts in the artifact viewer. check-in: a48474bc75 user: drh tags: trunk
2008-05-28
19:24
More ticket processing refinements. check-in: 27d2e6e458 user: drh tags: trunk
18:48
Continuing work on the ticketing system. check-in: 49380d500a user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/configure.c.
73
74
75
76
77
78
79


80
81
82
83
84
85
86
  { "timeline-block-markup", CONFIGSET_SKIN },
  { "timeline-max-comment",  CONFIGSET_SKIN },
  { "ticket-table",          CONFIGSET_TKT  },
  { "ticket-common",         CONFIGSET_TKT  },
  { "ticket-newpage",        CONFIGSET_TKT  },
  { "ticket-viewpage",       CONFIGSET_TKT  },
  { "ticket-editpage",       CONFIGSET_TKT  },


};
static int iConfig = 0;

/*
** Return name of first configuration property matching the given mask.
*/
const char *configure_first_name(int iMask){







>
>







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
  { "timeline-block-markup", CONFIGSET_SKIN },
  { "timeline-max-comment",  CONFIGSET_SKIN },
  { "ticket-table",          CONFIGSET_TKT  },
  { "ticket-common",         CONFIGSET_TKT  },
  { "ticket-newpage",        CONFIGSET_TKT  },
  { "ticket-viewpage",       CONFIGSET_TKT  },
  { "ticket-editpage",       CONFIGSET_TKT  },
  { "ticket-report-template", CONFIGSET_TKT },
  { "ticket-key-template",    CONFIGSET_TKT },
};
static int iConfig = 0;

/*
** Return name of first configuration property matching the given mask.
*/
const char *configure_first_name(int iMask){
Changes to src/tkt.c.
434
435
436
437
438
439
440



441
442
443
444
445
446
447
*/
void tktnew_page(void){
  const char *zScript;
  char *zNewUuid = 0;

  login_check_credentials();
  if( !g.okNewTkt ){ login_needed(); return; }



  style_header("New Ticket");
  ticket_init();
  getAllTicketFields();
  initializeVariablesFromDb();
  initializeVariablesFromCGI();
  @ <form method="POST" action="%s(g.zBaseURL)/%s(g.zPath)">
  zScript = ticket_newpage_code();







>
>
>







434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
*/
void tktnew_page(void){
  const char *zScript;
  char *zNewUuid = 0;

  login_check_credentials();
  if( !g.okNewTkt ){ login_needed(); return; }
  if( P("cancel") ){
    cgi_redirect("home");
  }
  style_header("New Ticket");
  ticket_init();
  getAllTicketFields();
  initializeVariablesFromDb();
  initializeVariablesFromCGI();
  @ <form method="POST" action="%s(g.zBaseURL)/%s(g.zPath)">
  zScript = ticket_newpage_code();
472
473
474
475
476
477
478
479
480




481
482
483
484
485
486
487
  const char *zScript;
  int nName;
  const char *zName;
  int nRec;

  login_check_credentials();
  if( !g.okApndTkt && !g.okWrTkt ){ login_needed(); return; }
  style_header("Edit Ticket");
  zName = P("name");




  if( zName==0 || (nName = strlen(zName))<4 || nName>UUID_SIZE
          || !validate16(zName,nName) ){
    @ <font color="red"><b>Not a valid ticket id: \"%h(zName)\"</b></font>
    style_footer();
    return;
  }
  nRec = db_int(0, "SELECT count(*) FROM ticket WHERE tkt_uuid GLOB '%q*'",







<

>
>
>
>







475
476
477
478
479
480
481

482
483
484
485
486
487
488
489
490
491
492
493
  const char *zScript;
  int nName;
  const char *zName;
  int nRec;

  login_check_credentials();
  if( !g.okApndTkt && !g.okWrTkt ){ login_needed(); return; }

  zName = P("name");
  if( P("cancel") ){
    cgi_redirectf("tktview?name=%T", zName);
  }
  style_header("Edit Ticket");
  if( zName==0 || (nName = strlen(zName))<4 || nName>UUID_SIZE
          || !validate16(zName,nName) ){
    @ <font color="red"><b>Not a valid ticket id: \"%h(zName)\"</b></font>
    style_footer();
    return;
  }
  nRec = db_int(0, "SELECT count(*) FROM ticket WHERE tkt_uuid GLOB '%q*'",
Changes to src/tktsetup.c.
307
308
309
310
311
312
313






314
315
316
317
318
319
320
@ <tr>
@ <td align="right">
@ <input type="submit" name="submit" value="Submit">
@ </td>
@ <td>After filling in the information above, press this button to create
@ the new ticket</td>
@ </tr>






@ </table>
;

/*
** Return the code used to generate the new ticket page
*/
const char *ticket_newpage_code(void){







>
>
>
>
>
>







307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
@ <tr>
@ <td align="right">
@ <input type="submit" name="submit" value="Submit">
@ </td>
@ <td>After filling in the information above, press this button to create
@ the new ticket</td>
@ </tr>
@ <tr>
@ <td align="right">
@ <input type="submit" name="cancel" value="Cancel">
@ </td>
@ <td>Abandon and forget this bug report</td>
@ </tr>
@ </table>
;

/*
** Return the code used to generate the new ticket page
*/
const char *ticket_newpage_code(void){
484
485
486
487
488
489
490

491
492
493
494
495
496
497
@    wrap="virtual" class="wikiedit">$<cmappnd></textarea><br>
@ <th1>enable_output [expr {[hascap w] && !$eall}]</th1>
@   <input type="submit" name="eallbtn" value="Edit All">
@ <th1>enable_output 1</th1>
@ </td></tr>
@ <tr><td align="right"></td><td>
@ <input type="submit" name="submit" value="Submit Changes">

@ </td></tr>
@ </table>
;

/*
** Return the code used to generate the edit ticket page
*/







>







490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
@    wrap="virtual" class="wikiedit">$<cmappnd></textarea><br>
@ <th1>enable_output [expr {[hascap w] && !$eall}]</th1>
@   <input type="submit" name="eallbtn" value="Edit All">
@ <th1>enable_output 1</th1>
@ </td></tr>
@ <tr><td align="right"></td><td>
@ <input type="submit" name="submit" value="Submit Changes">
@ <input type="submit" name="cancel" value="Cancel">
@ </td></tr>
@ </table>
;

/*
** Return the code used to generate the edit ticket page
*/