Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tktChangeScript Excluding Merge-Ins
This is equivalent to a diff from 9b1d394a71 to 9555560966
2012-02-10
| ||
23:05 | Merge in the code that optionally runs a TH1 script after each ticket edit. check-in: a9055964f3 user: drh tags: trunk | |
02:08 | Minor fix to autosetup so that it works on Solaris when using jimsh0. check-in: ced22eb209 user: drh tags: trunk | |
2012-02-09
| ||
13:55 | Experimental changes to the "update" command to have it report when it makes no changes to the repository. Closed-Leaf check-in: be10939bff user: drh tags: experimental | |
04:48 | Add experimental support for running a TH1 script after a ticket is edited or created. Closed-Leaf check-in: 9555560966 user: mistachkin tags: tktChangeScript | |
2012-02-08
| ||
03:04 | Update the version number to 1.22 and begin entering change log information for the next release. check-in: 9b1d394a71 user: drh tags: trunk | |
00:34 | Fix issues with the --brief option to the diff command. check-in: fbaa7ca99f user: drh tags: trunk | |
Changes to src/configure.c.
91 91 #ifdef FOSSIL_ENABLE_TCL 92 92 { "tcl", CONFIGSET_SKIN|CONFIGSET_TKT|CONFIGSET_XFER }, 93 93 #endif 94 94 { "timeline-block-markup", CONFIGSET_SKIN }, 95 95 { "timeline-max-comment", CONFIGSET_SKIN }, 96 96 { "ticket-table", CONFIGSET_TKT }, 97 97 { "ticket-common", CONFIGSET_TKT }, 98 + { "ticket-change", CONFIGSET_TKT }, 98 99 { "ticket-newpage", CONFIGSET_TKT }, 99 100 { "ticket-viewpage", CONFIGSET_TKT }, 100 101 { "ticket-editpage", CONFIGSET_TKT }, 101 102 { "ticket-reportlist", CONFIGSET_TKT }, 102 103 { "ticket-report-template", CONFIGSET_TKT }, 103 104 { "ticket-key-template", CONFIGSET_TKT }, 104 105 { "ticket-title-expr", CONFIGSET_TKT },
Changes to src/tkt.c.
240 240 */ 241 241 void ticket_init(void){ 242 242 const char *zConfig; 243 243 Th_FossilInit(); 244 244 zConfig = ticket_common_code(); 245 245 Th_Eval(g.interp, 0, zConfig, -1); 246 246 } 247 + 248 +/* 249 +** Create the subscript interpreter and load the "change" code. 250 +*/ 251 +int ticket_change(void){ 252 + const char *zConfig; 253 + Th_FossilInit(); 254 + zConfig = ticket_change_code(); 255 + return Th_Eval(g.interp, 0, zConfig, -1); 256 +} 247 257 248 258 /* 249 259 ** Recreate the ticket table. 250 260 */ 251 261 void ticket_create_table(int separateConnection){ 252 262 const char *zSql; 253 263 ................................................................................ 485 495 fossil_panic("trouble committing ticket: %s", g.zErrMsg); 486 496 } 487 497 manifest_crosslink_begin(); 488 498 manifest_crosslink(rid, &tktchng); 489 499 assert( blob_is_reset(&tktchng) ); 490 500 manifest_crosslink_end(); 491 501 } 492 - return TH_RETURN; 502 + return ticket_change(); 493 503 } 494 504 495 505 496 506 /* 497 507 ** WEBPAGE: tktnew 498 508 ** WEBPAGE: debug_tktnew 499 509 **
Changes to src/tktsetup.c.
36 36 @ <table border="0" cellspacing="20"> 37 37 setup_menu_entry("Table", "tktsetup_tab", 38 38 "Specify the schema of the \"ticket\" table in the database."); 39 39 setup_menu_entry("Timeline", "tktsetup_timeline", 40 40 "How to display ticket status in the timeline"); 41 41 setup_menu_entry("Common", "tktsetup_com", 42 42 "Common TH1 code run before all ticket processing."); 43 + setup_menu_entry("Change", "tktsetup_change", 44 + "The TH1 code run after a ticket is edited or created."); 43 45 setup_menu_entry("New Ticket Page", "tktsetup_newpage", 44 46 "HTML with embedded TH1 code for the \"new ticket\" webpage."); 45 47 setup_menu_entry("View Ticket Page", "tktsetup_viewpage", 46 48 "HTML with embedded TH1 code for the \"view ticket\" webpage."); 47 49 setup_menu_entry("Edit Ticket Page", "tktsetup_editpage", 48 50 "HTML with embedded TH1 code for the \"edit ticket\" webpage."); 49 51 setup_menu_entry("Report List Page", "tktsetup_reportlist", ................................................................................ 236 238 ; 237 239 tktsetup_generic( 238 240 "Ticket Common Script", 239 241 "ticket-common", 240 242 zDefaultTicketCommon, 241 243 zDesc, 242 244 0, 245 + 0, 246 + 30 247 + ); 248 +} 249 + 250 +static const char zDefaultTicketChange[] = 251 +@ return 252 +; 253 + 254 +/* 255 +** Return the ticket change code. 256 +*/ 257 +const char *ticket_change_code(void){ 258 + return db_get("ticket-change", (char*)zDefaultTicketChange); 259 +} 260 + 261 +/* 262 +** WEBPAGE: tktsetup_change 263 +*/ 264 +void tktsetup_change_page(void){ 265 + static const char zDesc[] = 266 + @ Enter TH1 script that runs after processing the ticket editing 267 + @ and creation pages. 268 + ; 269 + tktsetup_generic( 270 + "Ticket Change Script", 271 + "ticket-change", 272 + zDefaultTicketChange, 273 + zDesc, 274 + 0, 243 275 0, 244 276 30 245 277 ); 246 278 } 247 279 248 280 static const char zDefaultNew[] = 249 281 @ <th1>