Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Continuing work on the ticketing system. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
49380d500a1259b4dd10230c83d08162 |
| User & Date: | drh 2008-05-28 18:48:12.000 |
Context
|
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) | |
| 15:29 | Split of the ticket configuratio into separately editable pieces. ... (check-in: 86db6fa150 user: drh tags: trunk) | |
Changes
Changes to src/login.c.
| ︙ | ︙ | |||
309 310 311 312 313 314 315 |
int i;
for(i=0; zCap[i]; i++){
switch( zCap[i] ){
case 's': g.okSetup = 1;
case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = g.okQuery =
g.okRdWiki = g.okWrWiki = g.okNewWiki =
g.okApndWiki = g.okHistory = g.okClone =
| | > > | 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 |
int i;
for(i=0; zCap[i]; i++){
switch( zCap[i] ){
case 's': g.okSetup = 1;
case 'a': g.okAdmin = g.okRdTkt = g.okWrTkt = g.okQuery =
g.okRdWiki = g.okWrWiki = g.okNewWiki =
g.okApndWiki = g.okHistory = g.okClone =
g.okNewTkt = g.okPassword = g.okRdAddr =
g.okTktFmt = 1;
case 'i': g.okRead = g.okWrite = 1; break;
case 'o': g.okRead = 1; break;
case 'd': g.okDelete = 1; break;
case 'h': g.okHistory = 1; break;
case 'g': g.okClone = 1; break;
case 'p': g.okPassword = 1; break;
case 'q': g.okQuery = 1; break;
case 'j': g.okRdWiki = 1; break;
case 'k': g.okWrWiki = g.okRdWiki = g.okApndWiki =1; break;
case 'm': g.okApndWiki = 1; break;
case 'f': g.okNewWiki = 1; break;
case 'e': g.okRdAddr = 1; break;
case 'r': g.okRdTkt = 1; break;
case 'n': g.okNewTkt = 1; break;
case 'w': g.okWrTkt = g.okRdTkt = g.okNewTkt =
g.okApndTkt = 1; break;
case 'c': g.okApndTkt = 1; break;
case 't': g.okTktFmt = 1; break;
}
}
}
/*
** If the current login lacks any of the capabilities listed in
** the input, then return 0. If all capabilities are present, then
|
| ︙ | ︙ | |||
362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
case 'm': rc = g.okApndWiki; break;
case 'n': rc = g.okNewTkt; break;
case 'o': rc = g.okRead; break;
case 'p': rc = g.okPassword; break;
case 'q': rc = g.okQuery; break;
case 'r': rc = g.okRdTkt; break;
case 's': rc = g.okSetup; break;
case 'w': rc = g.okWrTkt; break;
default: rc = 0; break;
}
}
return rc;
}
| > | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
case 'm': rc = g.okApndWiki; break;
case 'n': rc = g.okNewTkt; break;
case 'o': rc = g.okRead; break;
case 'p': rc = g.okPassword; break;
case 'q': rc = g.okQuery; break;
case 'r': rc = g.okRdTkt; break;
case 's': rc = g.okSetup; break;
case 't': rc = g.okTktFmt; break;
case 'w': rc = g.okWrTkt; break;
default: rc = 0; break;
}
}
return rc;
}
|
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
112 113 114 115 116 117 118 119 120 121 122 123 124 125 | int okNewWiki; /* f: create new wiki via web */ int okApndWiki; /* m: append to wiki via web */ int okWrWiki; /* k: edit wiki via web */ int okRdTkt; /* r: view tickets via web */ int okNewTkt; /* n: create new tickets */ int okApndTkt; /* c: append to tickets via the web */ int okWrTkt; /* w: make changes to tickets via web */ int okRdAddr; /* e: read email addresses on tickets */ FILE *fDebug; /* Write debug information here, if the file exists */ /* Storage for the aux() and/or option() SQL function arguments */ int nAux; /* Number of distinct aux() or option() values */ const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */ | > | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | int okNewWiki; /* f: create new wiki via web */ int okApndWiki; /* m: append to wiki via web */ int okWrWiki; /* k: edit wiki via web */ int okRdTkt; /* r: view tickets via web */ int okNewTkt; /* n: create new tickets */ int okApndTkt; /* c: append to tickets via the web */ int okWrTkt; /* w: make changes to tickets via web */ int okTktFmt; /* t: create new ticket report formats */ int okRdAddr; /* e: read email addresses on tickets */ FILE *fDebug; /* Write debug information here, if the file exists */ /* Storage for the aux() and/or option() SQL function arguments */ int nAux; /* Number of distinct aux() or option() values */ const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */ |
| ︙ | ︙ |
Changes to src/report.c.
| ︙ | ︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 |
/*
** WEBPAGE: /reportlist
*/
void view_list(void){
Stmt q;
int rn = 0;
login_check_credentials();
if( !g.okRdTkt && !g.okNewTkt ){ login_needed(); return; }
style_header("Bug Report Main Menu");
if( g.okNewTkt ){
@ <p>Enter a new bug report:</p>
| > | > | | | | | 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 |
/*
** WEBPAGE: /reportlist
*/
void view_list(void){
Stmt q;
int rn = 0;
int cnt = 1;
login_check_credentials();
if( !g.okRdTkt && !g.okNewTkt ){ login_needed(); return; }
style_header("Bug Report Main Menu");
if( g.okNewTkt ){
@ <p>Enter a new bug report:</p>
@ <ol><li value="1"><a href="tktnew">New bug report</a></li></ol>
@
}
if( !g.okRdTkt ){
@ <p>You are not authorized to view existing bug reports.</p>
}else{
db_prepare(&q, "SELECT rn, title, owner FROM reportfmt ORDER BY title");
@ <p>Choose a report format from the following list:</p>
@ <ol>
while( db_step(&q)==SQLITE_ROW ){
rn = db_column_int(&q, 0);
const char *zTitle = db_column_text(&q, 1);
const char *zOwner = db_column_text(&q, 2);
cnt++;
@ <li value="%d(cnt)"><a href="rptview?rn=%d(rn)"
@ rel="nofollow">%h(zTitle)</a>
if( g.okWrite && zOwner && zOwner[0] ){
@ (by <i>%h(zOwner)</i>)
}
if( g.okTktFmt ){
@ [<a href="rptedit?rn=%d(rn)&copy=1" rel="nofollow">copy</a>]
}
if( g.okAdmin || (g.okWrTkt && zOwner && strcmp(g.zLogin,zOwner)==0) ){
@ [<a href="rptedit?rn=%d(rn)" rel="nofollow">edit</a>]
}
@ [<a href="rptsql?rn=%d(rn)" rel="nofollow">sql</a>]
@ </li>
}
}
@ </ol>
if( g.okTktFmt ){
@ <p>Create a new bug report display format:</p>
@ <ol>
@ <li value="%d(cnt+1)"><a href="rptnew">New report format</a></li>
@ </ol>
}
style_footer();
}
/*
** Remove whitespace from both ends of a string.
|
| ︙ | ︙ | |||
291 292 293 294 295 296 297 |
** WEBPAGE: /rptedit
*/
void view_edit(void){
int rn;
const char *zTitle;
const char *z;
const char *zOwner;
| | | 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
** WEBPAGE: /rptedit
*/
void view_edit(void){
int rn;
const char *zTitle;
const char *z;
const char *zOwner;
const char *zClrKey;
char *zSQL;
char *zErr = 0;
login_check_credentials();
if( !g.okQuery ){
login_needed();
return;
|
| ︙ | ︙ | |||
358 359 360 361 362 363 364 |
rn = db_last_insert_rowid();
}
cgi_redirect(mprintf("rptview?rn=%d", rn));
return;
}
}else if( rn==0 ){
zTitle = "";
| | < < < < < < < < < < < < < < < < < < < < | < < < < < < < < | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
rn = db_last_insert_rowid();
}
cgi_redirect(mprintf("rptview?rn=%d", rn));
return;
}
}else if( rn==0 ){
zTitle = "";
zSQL = ticket_report_template();
zClrKey = ticket_key_template();
}else{
Stmt q;
db_prepare(&q, "SELECT title, sqlcode, owner, cols "
"FROM reportfmt WHERE rn=%d",rn);
if( db_step(&q)==SQLITE_ROW ){
zTitle = db_column_malloc(&q, 0);
zSQL = db_column_malloc(&q, 1);
|
| ︙ | ︙ |
Changes to src/setup.c.
| ︙ | ︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 | @ <li value="13"><b>Append-Wiki</b>: Append to wiki pages</li> @ <li value="14"><b>New-Tkt</b>: Create new tickets</li> @ <li value="15"><b>Check-Out</b>: Check out versions</li> @ <li value="16"><b>Password</b>: Change your own password</li> @ <li value="17"><b>Query</b>: Create new queries against tickets</li> @ <li value="18"><b>Read-Tkt</b>: View tickets</li> @ <li value="19"><b>Setup:</b> Setup and configure this website</li> @ <li value="23"><b>Write-Tkt</b>: Edit tickets</li> @ </ol> @ </p></li> @ @ <li><p> @ Every user, logged in or not, has the privileges of <b>nobody</b>. @ Any human can login as <b>anonymous</b> since the password is | > | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | @ <li value="13"><b>Append-Wiki</b>: Append to wiki pages</li> @ <li value="14"><b>New-Tkt</b>: Create new tickets</li> @ <li value="15"><b>Check-Out</b>: Check out versions</li> @ <li value="16"><b>Password</b>: Change your own password</li> @ <li value="17"><b>Query</b>: Create new queries against tickets</li> @ <li value="18"><b>Read-Tkt</b>: View tickets</li> @ <li value="19"><b>Setup:</b> Setup and configure this website</li> @ <li value="20"><b>Tkt-Report:</b> Create new bug summary reports</li> @ <li value="23"><b>Write-Tkt</b>: Edit tickets</li> @ </ol> @ </p></li> @ @ <li><p> @ Every user, logged in or not, has the privileges of <b>nobody</b>. @ Any human can login as <b>anonymous</b> since the password is |
| ︙ | ︙ | |||
169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
/*
** WEBPAGE: /setup_uedit
*/
void user_edit(void){
const char *zId, *zLogin, *zInfo, *zCap;
char *oaa, *oas, *oar, *oaw, *oan, *oai, *oaj, *oao, *oap;
char *oak, *oad, *oaq, *oac, *oaf, *oam, *oah, *oag, *oae;
int doWrite;
int uid;
int higherUser = 0; /* True if user being edited is SETUP and the */
/* user doing the editing is ADMIN. Disallow editing */
/* Must have ADMIN privleges to access this page
*/
| > | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
/*
** WEBPAGE: /setup_uedit
*/
void user_edit(void){
const char *zId, *zLogin, *zInfo, *zCap;
char *oaa, *oas, *oar, *oaw, *oan, *oai, *oaj, *oao, *oap;
char *oak, *oad, *oaq, *oac, *oaf, *oam, *oah, *oag, *oae;
char *oat;
int doWrite;
int uid;
int higherUser = 0; /* True if user being edited is SETUP and the */
/* user doing the editing is ADMIN. Disallow editing */
/* Must have ADMIN privleges to access this page
*/
|
| ︙ | ︙ | |||
203 204 205 206 207 208 209 |
** modified user record. After writing the user record, redirect
** to the page that displays a list of users.
*/
doWrite = cgi_all("login","info","pw") && !higherUser;
if( doWrite ){
const char *zPw;
const char *zLogin;
| | > > | 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 |
** modified user record. After writing the user record, redirect
** to the page that displays a list of users.
*/
doWrite = cgi_all("login","info","pw") && !higherUser;
if( doWrite ){
const char *zPw;
const char *zLogin;
char zCap[50];
int i = 0;
int aa = P("aa")!=0;
int ad = P("ad")!=0;
int ae = P("ae")!=0;
int ai = P("ai")!=0;
int aj = P("aj")!=0;
int ak = P("ak")!=0;
int an = P("an")!=0;
int ao = P("ao")!=0;
int ap = P("ap")!=0;
int aq = P("aq")!=0;
int ar = P("ar")!=0;
int as = g.okSetup && P("as")!=0;
int aw = P("aw")!=0;
int ac = P("ac")!=0;
int af = P("af")!=0;
int am = P("am")!=0;
int ah = P("ah")!=0;
int ag = P("ag")!=0;
int at = P("at")!=0;
if( aa ){ zCap[i++] = 'a'; }
if( ac ){ zCap[i++] = 'c'; }
if( ad ){ zCap[i++] = 'd'; }
if( ae ){ zCap[i++] = 'e'; }
if( af ){ zCap[i++] = 'f'; }
if( ah ){ zCap[i++] = 'h'; }
if( ag ){ zCap[i++] = 'g'; }
if( ai ){ zCap[i++] = 'i'; }
if( aj ){ zCap[i++] = 'j'; }
if( ak ){ zCap[i++] = 'k'; }
if( am ){ zCap[i++] = 'm'; }
if( an ){ zCap[i++] = 'n'; }
if( ao ){ zCap[i++] = 'o'; }
if( ap ){ zCap[i++] = 'p'; }
if( aq ){ zCap[i++] = 'q'; }
if( ar ){ zCap[i++] = 'r'; }
if( as ){ zCap[i++] = 's'; }
if( at ){ zCap[i++] = 't'; }
if( aw ){ zCap[i++] = 'w'; }
zCap[i] = 0;
zPw = P("pw");
if( zPw==0 || zPw[0]==0 ){
zPw = db_text(0, "SELECT pw FROM user WHERE uid=%d", uid);
}
|
| ︙ | ︙ | |||
274 275 276 277 278 279 280 | /* Load the existing information about the user, if any */ zLogin = ""; zInfo = ""; zCap = ""; oaa = oac = oad = oae = oaf = oag = oah = oai = oaj = oak = oam = | | | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
/* Load the existing information about the user, if any
*/
zLogin = "";
zInfo = "";
zCap = "";
oaa = oac = oad = oae = oaf = oag = oah = oai = oaj = oak = oam =
oan = oao = oap = oaq = oar = oas = oat = oaw = "";
if( uid ){
zLogin = db_text("", "SELECT login FROM user WHERE uid=%d", uid);
zInfo = db_text("", "SELECT info FROM user WHERE uid=%d", uid);
zCap = db_text("", "SELECT cap FROM user WHERE uid=%d", uid);
if( strchr(zCap, 'a') ) oaa = " checked";
if( strchr(zCap, 'c') ) oac = " checked";
if( strchr(zCap, 'd') ) oad = " checked";
|
| ︙ | ︙ | |||
296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
if( strchr(zCap, 'm') ) oam = " checked";
if( strchr(zCap, 'n') ) oan = " checked";
if( strchr(zCap, 'o') ) oao = " checked";
if( strchr(zCap, 'p') ) oap = " checked";
if( strchr(zCap, 'q') ) oaq = " checked";
if( strchr(zCap, 'r') ) oar = " checked";
if( strchr(zCap, 's') ) oas = " checked";
if( strchr(zCap, 'w') ) oaw = " checked";
}
/* Begin generating the page
*/
style_submenu_element("Cancel", "Cancel", "setup_ulist");
if( uid ){
| > | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
if( strchr(zCap, 'm') ) oam = " checked";
if( strchr(zCap, 'n') ) oan = " checked";
if( strchr(zCap, 'o') ) oao = " checked";
if( strchr(zCap, 'p') ) oap = " checked";
if( strchr(zCap, 'q') ) oaq = " checked";
if( strchr(zCap, 'r') ) oar = " checked";
if( strchr(zCap, 's') ) oas = " checked";
if( strchr(zCap, 't') ) oat = " checked";
if( strchr(zCap, 'w') ) oaw = " checked";
}
/* Begin generating the page
*/
style_submenu_element("Cancel", "Cancel", "setup_ulist");
if( uid ){
|
| ︙ | ︙ | |||
348 349 350 351 352 353 354 | @ <input type="checkbox" name="aj"%s(oaj)>Read Wiki</input><br> @ <input type="checkbox" name="af"%s(oaf)>New Wiki</input><br> @ <input type="checkbox" name="am"%s(oam)>Append Wiki</input><br> @ <input type="checkbox" name="ak"%s(oak)>Write Wiki</input><br> @ <input type="checkbox" name="ar"%s(oar)>Read Tkt</input><br> @ <input type="checkbox" name="an"%s(oan)>New Tkt</input><br> @ <input type="checkbox" name="ac"%s(oac)>Append Tkt</input><br> | | > | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
@ <input type="checkbox" name="aj"%s(oaj)>Read Wiki</input><br>
@ <input type="checkbox" name="af"%s(oaf)>New Wiki</input><br>
@ <input type="checkbox" name="am"%s(oam)>Append Wiki</input><br>
@ <input type="checkbox" name="ak"%s(oak)>Write Wiki</input><br>
@ <input type="checkbox" name="ar"%s(oar)>Read Tkt</input><br>
@ <input type="checkbox" name="an"%s(oan)>New Tkt</input><br>
@ <input type="checkbox" name="ac"%s(oac)>Append Tkt</input><br>
@ <input type="checkbox" name="aw"%s(oaw)>Write Tkt</input><br>
@ <input type="checkbox" name="at"%s(oat)>Tkt Report</input>
@ </td>
@ </tr>
@ <tr>
@ <td align="right">Password:</td>
@ <td><input type="password" name="pw" value=""></td>
@ </tr>
if( !higherUser ){
|
| ︙ | ︙ |
Changes to src/tkt.c.
| ︙ | ︙ | |||
100 101 102 103 104 105 106 |
** variables.
*/
static void initializeVariablesFromDb(void){
const char *zName;
Stmt q;
int i, n, size, j;
| | > | | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
** variables.
*/
static void initializeVariablesFromDb(void){
const char *zName;
Stmt q;
int i, n, size, j;
zName = PD("name","-none-");
db_prepare(&q, "SELECT datetime(tkt_mtime) AS tkt_datetime, *"
" FROM ticket WHERE tkt_uuid GLOB '%q*'", zName);
if( db_step(&q)==SQLITE_ROW ){
n = db_column_count(&q);
for(i=0; i<n; i++){
const char *zVal = db_column_text(&q, i);
const char *zName = db_column_name(&q, i);
if( zVal==0 ) zVal = "";
for(j=0; j<nField; j++){
|
| ︙ | ︙ |
Changes to src/tktsetup.c.
| ︙ | ︙ | |||
46 47 48 49 50 51 52 |
"Common TH1 code run before all ticket processing.");
setup_menu_entry("New Ticket Page", "tktsetup_newpage",
"HTML with embedded TH1 code for the \"new ticket\" webpage.");
setup_menu_entry("View Ticket Page", "tktsetup_viewpage",
"HTML with embedded TH1 code for the \"view ticket\" webpage.");
setup_menu_entry("Edit Ticket Page", "tktsetup_editpage",
"HTML with embedded TH1 code for the \"edit ticket\" webpage.");
| | > > | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
"Common TH1 code run before all ticket processing.");
setup_menu_entry("New Ticket Page", "tktsetup_newpage",
"HTML with embedded TH1 code for the \"new ticket\" webpage.");
setup_menu_entry("View Ticket Page", "tktsetup_viewpage",
"HTML with embedded TH1 code for the \"view ticket\" webpage.");
setup_menu_entry("Edit Ticket Page", "tktsetup_editpage",
"HTML with embedded TH1 code for the \"edit ticket\" webpage.");
setup_menu_entry("Report Template", "tktsetup_rpttplt",
"The default ticket report format.");
setup_menu_entry("Key Template", "tktsetup_keytplt",
"The default color key for reports.");
@ </table>
style_footer();
}
/* @-comment: ** */
static const char zDefaultTicketTable[] =
@ CREATE TABLE ticket(
|
| ︙ | ︙ | |||
196 197 198 199 200 201 202 |
@ Duplicate
@ Overcome_By_Events
@ Drive_By_Patch
@ }
@ set status_choices {
@ Open
@ Verified
| | | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
@ Duplicate
@ Overcome_By_Events
@ Drive_By_Patch
@ }
@ set status_choices {
@ Open
@ Verified
@ Review
@ Deferred
@ Fixed
@ Tested
@ Closed
@ }
@ set subsystem_choices {one two three}
;
|
| ︙ | ︙ | |||
238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
static const char zDefaultNew[] =
@ <th1>
@ if {[info exists submit]} {
@ set status Open
@ submit_ticket
@ }
@ </th1>
@ <table cellpadding="5">
@ <tr>
@ <td colspan="2">
@ Enter a one-line summary of the problem:<br>
@ <input type="text" name="title" size="60" value="$<title>">
@ </td>
@ </tr>
| > | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
static const char zDefaultNew[] =
@ <th1>
@ if {[info exists submit]} {
@ set status Open
@ submit_ticket
@ }
@ </th1>
@ <h1 align="center">Enter A New Bug Report</h1>
@ <table cellpadding="5">
@ <tr>
@ <td colspan="2">
@ Enter a one-line summary of the problem:<br>
@ <input type="text" name="title" size="60" value="$<title>">
@ </td>
@ </tr>
|
| ︙ | ︙ | |||
272 273 274 275 276 277 278 | @ effect the operation of the product?</td> @ </tr> @ @ <tr> @ <td align="right">EMail: @ <input type="text" name="contact" value="$<contact>" size="30"> @ </td> | | | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | @ effect the operation of the product?</td> @ </tr> @ @ <tr> @ <td align="right">EMail: @ <input type="text" name="contact" value="$<contact>" size="30"> @ </td> @ <td><u>Not publicly visible</u>. Used by developers to contact you with @ questions.</td> @ </tr> @ @ <tr> @ <td colspan="2"> @ Enter a detailed description of the problem. @ For code defects, be sure to provide details on exactly how |
| ︙ | ︙ | |||
335 336 337 338 339 340 341 |
0,
40
);
}
static const char zDefaultView[] =
@ <table cellpadding="5">
| > > > | > | | | | | | > > > | | | | | | > | > > | | | 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 |
0,
40
);
}
static const char zDefaultView[] =
@ <table cellpadding="5">
@ <tr><td align="right">Ticket UUID:</td><td bgcolor="#d0d0d0" colspan="3">
@ $<tkt_uuid>
@ </td></tr>
@ <tr><td align="right">Title:</td>
@ <td bgcolor="#d0d0d0" colspan="3" valign="top">
@ $<title>
@ </td></tr>
@ <tr><td align="right">Status:</td><td bgcolor="#d0d0d0">
@ $<status>
@ </td>
@ <td align="right">Type:</td><td bgcolor="#d0d0d0">
@ $<type>
@ </td></tr>
@ <tr><td align="right">Severity:</td><td bgcolor="#d0d0d0">
@ $<severity>
@ </td>
@ <td align="right">Priority:</td><td bgcolor="#d0d0d0">
@ $<priority>
@ </td></tr>
@ <tr><td align="right">Subsystem:</td><td bgcolor="#d0d0d0">
@ $<subsystem>
@ </td>
@ <td align="right">Resolution:</td><td bgcolor="#d0d0d0">
@ $<resolution>
@ </td></tr>
@ <tr><td align="right">Last Modified:</td><td bgcolor="#d0d0d0">
@ $<tkt_datetime>
@ </td>
@ <th1>enable_output [hascap e]</th1>
@ <td align="right">Contact:</td><td bgcolor="#d0d0d0">
@ $<contact>
@ </td>
@ <th1>enable_output 1</th1>
@ </tr>
@ <tr><td align="right">Version Found In:</td>
@ <td colspan="3" valign="top" bgcolor="#d0d0d0">
@ $<foundin>
@ </td></tr>
@ <tr><td>Description & Comments:</td></tr>
@ <tr><td colspan="4" bgcolor="#d0d0d0">
@ Description And Comments:<br>
@ <span bgcolor="#d0d0d0"><th1>wiki $comment</th1></span>
@ </td></tr>
@ </table>
;
/*
** Return the code used to generate the view ticket page
|
| ︙ | ︙ | |||
500 501 502 503 504 505 506 |
zDefaultEdit,
zDesc,
0,
0,
40
);
}
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 |
zDefaultEdit,
zDesc,
0,
0,
40
);
}
/*
** The default template ticket report format:
*/
static char zDefaultReport[] =
@ SELECT
@ CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
@ WHEN status='Review' THEN '#e8e8e8'
@ WHEN status='Fixed' THEN '#cfe8bd'
@ WHEN status='Tested' THEN '#bde5d6'
@ WHEN status='Deferred' THEN '#cacae5'
@ ELSE '#c8c8c8' END AS 'bgcolor',
@ substr(tkt_uuid,1,10) AS '#',
@ datetime(tkt_mtime) AS 'mtime',
@ type,
@ status,
@ subsystem,
@ title,
@ comment AS '_comments'
@ FROM ticket
;
/*
** Return the template ticket report format:
*/
char *ticket_report_template(void){
return db_get("ticket-report-template", zDefaultReport);
}
/*
** WEBPAGE: tktsetup_rpttplt
*/
void tktsetup_rpttplt_page(void){
static const char zDesc[] =
@ <p>Enter the default ticket report format template. This is the
@ the template report format that initial appears when creating a
@ new ticket summary report.</p>
;
tktsetup_generic(
"Default Report Template",
"ticket-report-template",
zDefaultReport,
zDesc,
0,
0,
20
);
}
/*
** The default template ticket key:
*/
static const char zDefaultKey[] =
@ #ffffff Key:
@ #f2dcdc Active
@ #e8e8e8 Review
@ #cfe8bd Fixed
@ #bde5d6 Tested
@ #cacae5 Deferred
@ #c8c8c8 Closed
;
/*
** Return the template ticket report format:
*/
const char *ticket_key_template(void){
return db_get("ticket-key-template", (char*)zDefaultKey);
}
/*
** WEBPAGE: tktsetup_keytplt
*/
void tktsetup_keytplt_page(void){
static const char zDesc[] =
@ <p>Enter the default ticket report key template. This is the
@ the template report format that initial appears when creating a
@ new ticket summary report.</p>
;
tktsetup_generic(
"Default Report Template",
"ticket-report-template",
zDefaultReport,
zDesc,
0,
0,
20
);
}
|