@@ -923,19 +923,22 @@
*/
void manifest_ticket_event(
int rid, /* Artifact ID of the change ticket artifact */
const Manifest *pManifest, /* Parsed content of the artifact */
- int isNew /* True if this is the first event */
+ int isNew, /* True if this is the first event */
+ int tktTagId /* Ticket tag ID */
){
int i;
char *zTitle;
Blob comment;
+ Blob brief;
char *zNewStatus = 0;
static char *zTitleExpr = 0;
static char *zStatusColumn = 0;
static int once = 1;
blob_zero(&comment);
+ blob_zero(&brief);
if( once ){
once = 0;
zTitleExpr = db_get("ticket-title-expr", "title");
zStatusColumn = db_get("ticket-status-column", "status");
@@ -957,8 +960,10 @@
if( pManifest->nField>1 ){
blob_appendf(&comment, " plus %d other change%s",
pManifest->nField-1, pManifest->nField==2 ? "" : "s");
}
+ blob_appendf(&brief, "%h ticket [%.10s].",
+ zNewStatus, pManifest->zTicketUuid);
}else{
zNewStatus = db_text("unknown",
"SELECT %s FROM ticket WHERE tkt_uuid='%s'",
zStatusColumn, pManifest->zTicketUuid
@@ -968,21 +973,28 @@
pManifest->zTicketUuid, zTitle, zNewStatus, pManifest->nField,
pManifest->nField==1 ? "" : "s"
);
free(zNewStatus);
+ blob_appendf(&brief, "Ticket [%.10s]: %d change%s",
+ pManifest->zTicketUuid, pManifest->nField,
+ pManifest->nField==1 ? "" : "s"
+ );
}
}else{
blob_appendf(&comment, "New ticket [%.10s] <i>%h</i>.",
pManifest->zTicketUuid, zTitle
);
+ blob_appendf(&brief, "New ticket [%.10s].", pManifest->zTicketUuid);
}
free(zTitle);
db_multi_exec(
- "REPLACE INTO event(type,mtime,objid,user,comment)"
- "VALUES('t',%.17g,%d,%Q,%Q)",
- pManifest->rDate, rid, pManifest->zUser, blob_str(&comment)
+ "REPLACE INTO event(type,tagid,mtime,objid,user,comment,brief)"
+ "VALUES('t',%d,%.17g,%d,%Q,%Q,%Q)",
+ tktTagId, pManifest->rDate, rid, pManifest->zUser,
+ blob_str(&comment), blob_str(&brief)
);
blob_reset(&comment);
+ blob_reset(&brief);
}
/*
** Scan artifact rid/pContent to see if it is a control artifact of