Fossil SCM

Display ticket titles as plaintext on the timeline. Provide a hyperlink to attachments on the timeline.

drh 2012-11-23 23:25 UTC ticket-enhancements
Commit c6a5efa12cc0edd5214baadb8c83d39b8219b8f8
2 files changed +8 -6 +2
+8 -6
--- src/manifest.c
+++ src/manifest.c
@@ -1552,11 +1552,11 @@
15521552
if( fossil_strcmp(pManifest->aField[i].zName, zStatusColumn)==0 ){
15531553
zNewStatus = pManifest->aField[i].zValue;
15541554
}
15551555
}
15561556
if( zNewStatus ){
1557
- blob_appendf(&comment, "%h ticket [%.10s]: <i>%s</i>",
1557
+ blob_appendf(&comment, "%h ticket [%.10s]: <i>%h</i>",
15581558
zNewStatus, pManifest->zTicketUuid, zTitle
15591559
);
15601560
if( pManifest->nField>1 ){
15611561
blob_appendf(&comment, " plus %d other change%s",
15621562
pManifest->nField-1, pManifest->nField==2 ? "" : "s");
@@ -1566,11 +1566,11 @@
15661566
}else{
15671567
zNewStatus = db_text("unknown",
15681568
"SELECT %s FROM ticket WHERE tkt_uuid='%s'",
15691569
zStatusColumn, pManifest->zTicketUuid
15701570
);
1571
- blob_appendf(&comment, "Ticket [%.10s] <i>%s</i> status still %h with "
1571
+ blob_appendf(&comment, "Ticket [%.10s] <i>%h</i> status still %h with "
15721572
"%d other change%s",
15731573
pManifest->zTicketUuid, zTitle, zNewStatus, pManifest->nField,
15741574
pManifest->nField==1 ? "" : "s"
15751575
);
15761576
free(zNewStatus);
@@ -1868,12 +1868,13 @@
18681868
if( strlen(p->zAttachTarget)!=UUID_SIZE
18691869
|| !validate16(p->zAttachTarget, UUID_SIZE)
18701870
){
18711871
char *zComment;
18721872
if( p->zAttachSrc && p->zAttachSrc[0] ){
1873
- zComment = mprintf("Add attachment \"%h\" to wiki page [%h]",
1874
- p->zAttachName, p->zAttachTarget);
1873
+ zComment = mprintf(
1874
+ "Add attachment [%R/artifact/%S|%h] to wiki page [%h]",
1875
+ p->zAttachSrc, p->zAttachName, p->zAttachTarget);
18751876
}else{
18761877
zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]",
18771878
p->zAttachName, p->zAttachTarget);
18781879
}
18791880
db_multi_exec(
@@ -1883,12 +1884,13 @@
18831884
);
18841885
free(zComment);
18851886
}else{
18861887
char *zComment;
18871888
if( p->zAttachSrc && p->zAttachSrc[0] ){
1888
- zComment = mprintf("Add attachment \"%h\" to ticket [%.10s]",
1889
- p->zAttachName, p->zAttachTarget);
1889
+ zComment = mprintf(
1890
+ "Add attachment [%R/artifact/%S|%h] to ticket [%S]",
1891
+ p->zAttachSrc, p->zAttachName, p->zAttachTarget);
18901892
}else{
18911893
zComment = mprintf("Delete attachment \"%h\" from ticket [%.10s]",
18921894
p->zAttachName, p->zAttachTarget);
18931895
}
18941896
db_multi_exec(
18951897
--- src/manifest.c
+++ src/manifest.c
@@ -1552,11 +1552,11 @@
1552 if( fossil_strcmp(pManifest->aField[i].zName, zStatusColumn)==0 ){
1553 zNewStatus = pManifest->aField[i].zValue;
1554 }
1555 }
1556 if( zNewStatus ){
1557 blob_appendf(&comment, "%h ticket [%.10s]: <i>%s</i>",
1558 zNewStatus, pManifest->zTicketUuid, zTitle
1559 );
1560 if( pManifest->nField>1 ){
1561 blob_appendf(&comment, " plus %d other change%s",
1562 pManifest->nField-1, pManifest->nField==2 ? "" : "s");
@@ -1566,11 +1566,11 @@
1566 }else{
1567 zNewStatus = db_text("unknown",
1568 "SELECT %s FROM ticket WHERE tkt_uuid='%s'",
1569 zStatusColumn, pManifest->zTicketUuid
1570 );
1571 blob_appendf(&comment, "Ticket [%.10s] <i>%s</i> status still %h with "
1572 "%d other change%s",
1573 pManifest->zTicketUuid, zTitle, zNewStatus, pManifest->nField,
1574 pManifest->nField==1 ? "" : "s"
1575 );
1576 free(zNewStatus);
@@ -1868,12 +1868,13 @@
1868 if( strlen(p->zAttachTarget)!=UUID_SIZE
1869 || !validate16(p->zAttachTarget, UUID_SIZE)
1870 ){
1871 char *zComment;
1872 if( p->zAttachSrc && p->zAttachSrc[0] ){
1873 zComment = mprintf("Add attachment \"%h\" to wiki page [%h]",
1874 p->zAttachName, p->zAttachTarget);
 
1875 }else{
1876 zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]",
1877 p->zAttachName, p->zAttachTarget);
1878 }
1879 db_multi_exec(
@@ -1883,12 +1884,13 @@
1883 );
1884 free(zComment);
1885 }else{
1886 char *zComment;
1887 if( p->zAttachSrc && p->zAttachSrc[0] ){
1888 zComment = mprintf("Add attachment \"%h\" to ticket [%.10s]",
1889 p->zAttachName, p->zAttachTarget);
 
1890 }else{
1891 zComment = mprintf("Delete attachment \"%h\" from ticket [%.10s]",
1892 p->zAttachName, p->zAttachTarget);
1893 }
1894 db_multi_exec(
1895
--- src/manifest.c
+++ src/manifest.c
@@ -1552,11 +1552,11 @@
1552 if( fossil_strcmp(pManifest->aField[i].zName, zStatusColumn)==0 ){
1553 zNewStatus = pManifest->aField[i].zValue;
1554 }
1555 }
1556 if( zNewStatus ){
1557 blob_appendf(&comment, "%h ticket [%.10s]: <i>%h</i>",
1558 zNewStatus, pManifest->zTicketUuid, zTitle
1559 );
1560 if( pManifest->nField>1 ){
1561 blob_appendf(&comment, " plus %d other change%s",
1562 pManifest->nField-1, pManifest->nField==2 ? "" : "s");
@@ -1566,11 +1566,11 @@
1566 }else{
1567 zNewStatus = db_text("unknown",
1568 "SELECT %s FROM ticket WHERE tkt_uuid='%s'",
1569 zStatusColumn, pManifest->zTicketUuid
1570 );
1571 blob_appendf(&comment, "Ticket [%.10s] <i>%h</i> status still %h with "
1572 "%d other change%s",
1573 pManifest->zTicketUuid, zTitle, zNewStatus, pManifest->nField,
1574 pManifest->nField==1 ? "" : "s"
1575 );
1576 free(zNewStatus);
@@ -1868,12 +1868,13 @@
1868 if( strlen(p->zAttachTarget)!=UUID_SIZE
1869 || !validate16(p->zAttachTarget, UUID_SIZE)
1870 ){
1871 char *zComment;
1872 if( p->zAttachSrc && p->zAttachSrc[0] ){
1873 zComment = mprintf(
1874 "Add attachment [%R/artifact/%S|%h] to wiki page [%h]",
1875 p->zAttachSrc, p->zAttachName, p->zAttachTarget);
1876 }else{
1877 zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]",
1878 p->zAttachName, p->zAttachTarget);
1879 }
1880 db_multi_exec(
@@ -1883,12 +1884,13 @@
1884 );
1885 free(zComment);
1886 }else{
1887 char *zComment;
1888 if( p->zAttachSrc && p->zAttachSrc[0] ){
1889 zComment = mprintf(
1890 "Add attachment [%R/artifact/%S|%h] to ticket [%S]",
1891 p->zAttachSrc, p->zAttachName, p->zAttachTarget);
1892 }else{
1893 zComment = mprintf("Delete attachment \"%h\" from ticket [%.10s]",
1894 p->zAttachName, p->zAttachTarget);
1895 }
1896 db_multi_exec(
1897
--- src/timeline.c
+++ src/timeline.c
@@ -345,10 +345,12 @@
345345
}else if( (tmFlags & TIMELINE_ARTID)!=0 ){
346346
hyperlink_to_uuid(zUuid);
347347
}
348348
db_column_blob(pQuery, commentColumn, &comment);
349349
if( zType[0]!='c' ){
350
+ /* Comments for anything other than a check-in are generated by
351
+ ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */
350352
wiki_convert(&comment, 0, WIKI_INLINE);
351353
}else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
352354
Blob truncated;
353355
blob_zero(&truncated);
354356
blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
355357
--- src/timeline.c
+++ src/timeline.c
@@ -345,10 +345,12 @@
345 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
346 hyperlink_to_uuid(zUuid);
347 }
348 db_column_blob(pQuery, commentColumn, &comment);
349 if( zType[0]!='c' ){
 
 
350 wiki_convert(&comment, 0, WIKI_INLINE);
351 }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
352 Blob truncated;
353 blob_zero(&truncated);
354 blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
355
--- src/timeline.c
+++ src/timeline.c
@@ -345,10 +345,12 @@
345 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
346 hyperlink_to_uuid(zUuid);
347 }
348 db_column_blob(pQuery, commentColumn, &comment);
349 if( zType[0]!='c' ){
350 /* Comments for anything other than a check-in are generated by
351 ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */
352 wiki_convert(&comment, 0, WIKI_INLINE);
353 }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
354 Blob truncated;
355 blob_zero(&truncated);
356 blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
357

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button