Fossil SCM

Add the "New Ticket" option to timeline displays.

drh 2019-12-23 12:38 trunk
Commit 9bb70584a1d7d2f7eca71e20674aa0a60b36802a061cfb67e99e11f33279de61
1 file changed +15 -4
+15 -4
--- src/timeline.c
+++ src/timeline.c
@@ -615,11 +615,12 @@
615615
cgi_printf("technote: ");
616616
hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
617617
}else{
618618
cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
619619
}
620
- }else if( zType[0]=='g' || zType[0]=='w' || zType[0]=='t' || zType[0]=='f'){
620
+ }else if( zType[0]=='g' || zType[0]=='w' || zType[0]=='t'
621
+ || zType[0]=='n' || zType[0]=='f'){
621622
cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
622623
}
623624
624625
if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){
625626
char *zLink = mprintf("%R/timeline?u=%h&c=%t&y=a", zDispUser, zDate);
@@ -1145,11 +1146,11 @@
11451146
** set the y= parameter that determines which elements to display
11461147
** on the timeline.
11471148
*/
11481149
static void timeline_y_submenu(int isDisabled){
11491150
static int i = 0;
1150
- static const char *az[14];
1151
+ static const char *az[16];
11511152
if( i==0 ){
11521153
az[0] = "all";
11531154
az[1] = "Any Type";
11541155
i = 2;
11551156
if( g.perm.Read ){
@@ -1163,10 +1164,12 @@
11631164
az[i++] = "Tech Notes";
11641165
}
11651166
if( g.perm.RdTkt ){
11661167
az[i++] = "t";
11671168
az[i++] = "Tickets";
1169
+ az[i++] = "n";
1170
+ az[i++] = "New Tickets";
11681171
}
11691172
if( g.perm.RdWiki ){
11701173
az[i++] = "w";
11711174
az[i++] = "Wiki";
11721175
}
@@ -1516,11 +1519,11 @@
15161519
** rel Show related check-ins as well as those matching t=TAG
15171520
** mionly Limit rel to show ancestors but not descendants
15181521
** nowiki Do not show wiki associated with branch or tag
15191522
** ms=MATCHSTYLE Set tag match style to EXACT, GLOB, LIKE, REGEXP
15201523
** u=USER Only show items associated with USER
1521
-** y=TYPE 'ci', 'w', 't', 'e', 'f', or 'all'.
1524
+** y=TYPE 'ci', 'w', 't', 'n', 'e', 'f', or 'all'.
15221525
** ss=VIEWSTYLE c: "Compact" v: "Verbose" m: "Modern" j: "Columnar"
15231526
** advm Use the "Advanced" or "Busy" menu design.
15241527
** ng No Graph.
15251528
** ncp Omit cherrypick merges
15261529
** nd Do not highlight the focus check-in
@@ -2140,10 +2143,11 @@
21402143
}
21412144
}
21422145
}
21432146
if( (zType[0]=='w' && !g.perm.RdWiki)
21442147
|| (zType[0]=='t' && !g.perm.RdTkt)
2148
+ || (zType[0]=='n' && !g.perm.RdTkt)
21452149
|| (zType[0]=='e' && !g.perm.RdWiki)
21462150
|| (zType[0]=='c' && !g.perm.Read)
21472151
|| (zType[0]=='g' && !g.perm.Read)
21482152
|| (zType[0]=='f' && !g.perm.RdForum)
21492153
){
@@ -2170,17 +2174,24 @@
21702174
cSep = ',';
21712175
}
21722176
blob_append_sql(&cond, ")");
21732177
}
21742178
}else{ /* zType!="all" */
2175
- blob_append_sql(&cond, " AND event.type=%Q", zType);
2179
+ if( zType[0]=='n' ){
2180
+ blob_append_sql(&cond,
2181
+ " AND event.type='t' AND event.comment GLOB 'New ticket*'");
2182
+ }else{
2183
+ blob_append_sql(&cond, " AND event.type=%Q", zType);
2184
+ }
21762185
if( zType[0]=='c' ){
21772186
zEType = "check-in";
21782187
}else if( zType[0]=='w' ){
21792188
zEType = "wiki";
21802189
}else if( zType[0]=='t' ){
21812190
zEType = "ticket change";
2191
+ }else if( zType[0]=='t' ){
2192
+ zEType = "new tickets";
21822193
}else if( zType[0]=='e' ){
21832194
zEType = "technical note";
21842195
}else if( zType[0]=='g' ){
21852196
zEType = "tag";
21862197
}else if( zType[0]=='f' ){
21872198
--- src/timeline.c
+++ src/timeline.c
@@ -615,11 +615,12 @@
615 cgi_printf("technote:&nbsp;");
616 hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
617 }else{
618 cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
619 }
620 }else if( zType[0]=='g' || zType[0]=='w' || zType[0]=='t' || zType[0]=='f'){
 
621 cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
622 }
623
624 if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){
625 char *zLink = mprintf("%R/timeline?u=%h&c=%t&y=a", zDispUser, zDate);
@@ -1145,11 +1146,11 @@
1145 ** set the y= parameter that determines which elements to display
1146 ** on the timeline.
1147 */
1148 static void timeline_y_submenu(int isDisabled){
1149 static int i = 0;
1150 static const char *az[14];
1151 if( i==0 ){
1152 az[0] = "all";
1153 az[1] = "Any Type";
1154 i = 2;
1155 if( g.perm.Read ){
@@ -1163,10 +1164,12 @@
1163 az[i++] = "Tech Notes";
1164 }
1165 if( g.perm.RdTkt ){
1166 az[i++] = "t";
1167 az[i++] = "Tickets";
 
 
1168 }
1169 if( g.perm.RdWiki ){
1170 az[i++] = "w";
1171 az[i++] = "Wiki";
1172 }
@@ -1516,11 +1519,11 @@
1516 ** rel Show related check-ins as well as those matching t=TAG
1517 ** mionly Limit rel to show ancestors but not descendants
1518 ** nowiki Do not show wiki associated with branch or tag
1519 ** ms=MATCHSTYLE Set tag match style to EXACT, GLOB, LIKE, REGEXP
1520 ** u=USER Only show items associated with USER
1521 ** y=TYPE 'ci', 'w', 't', 'e', 'f', or 'all'.
1522 ** ss=VIEWSTYLE c: "Compact" v: "Verbose" m: "Modern" j: "Columnar"
1523 ** advm Use the "Advanced" or "Busy" menu design.
1524 ** ng No Graph.
1525 ** ncp Omit cherrypick merges
1526 ** nd Do not highlight the focus check-in
@@ -2140,10 +2143,11 @@
2140 }
2141 }
2142 }
2143 if( (zType[0]=='w' && !g.perm.RdWiki)
2144 || (zType[0]=='t' && !g.perm.RdTkt)
 
2145 || (zType[0]=='e' && !g.perm.RdWiki)
2146 || (zType[0]=='c' && !g.perm.Read)
2147 || (zType[0]=='g' && !g.perm.Read)
2148 || (zType[0]=='f' && !g.perm.RdForum)
2149 ){
@@ -2170,17 +2174,24 @@
2170 cSep = ',';
2171 }
2172 blob_append_sql(&cond, ")");
2173 }
2174 }else{ /* zType!="all" */
2175 blob_append_sql(&cond, " AND event.type=%Q", zType);
 
 
 
 
 
2176 if( zType[0]=='c' ){
2177 zEType = "check-in";
2178 }else if( zType[0]=='w' ){
2179 zEType = "wiki";
2180 }else if( zType[0]=='t' ){
2181 zEType = "ticket change";
 
 
2182 }else if( zType[0]=='e' ){
2183 zEType = "technical note";
2184 }else if( zType[0]=='g' ){
2185 zEType = "tag";
2186 }else if( zType[0]=='f' ){
2187
--- src/timeline.c
+++ src/timeline.c
@@ -615,11 +615,12 @@
615 cgi_printf("technote:&nbsp;");
616 hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
617 }else{
618 cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
619 }
620 }else if( zType[0]=='g' || zType[0]=='w' || zType[0]=='t'
621 || zType[0]=='n' || zType[0]=='f'){
622 cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
623 }
624
625 if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){
626 char *zLink = mprintf("%R/timeline?u=%h&c=%t&y=a", zDispUser, zDate);
@@ -1145,11 +1146,11 @@
1146 ** set the y= parameter that determines which elements to display
1147 ** on the timeline.
1148 */
1149 static void timeline_y_submenu(int isDisabled){
1150 static int i = 0;
1151 static const char *az[16];
1152 if( i==0 ){
1153 az[0] = "all";
1154 az[1] = "Any Type";
1155 i = 2;
1156 if( g.perm.Read ){
@@ -1163,10 +1164,12 @@
1164 az[i++] = "Tech Notes";
1165 }
1166 if( g.perm.RdTkt ){
1167 az[i++] = "t";
1168 az[i++] = "Tickets";
1169 az[i++] = "n";
1170 az[i++] = "New Tickets";
1171 }
1172 if( g.perm.RdWiki ){
1173 az[i++] = "w";
1174 az[i++] = "Wiki";
1175 }
@@ -1516,11 +1519,11 @@
1519 ** rel Show related check-ins as well as those matching t=TAG
1520 ** mionly Limit rel to show ancestors but not descendants
1521 ** nowiki Do not show wiki associated with branch or tag
1522 ** ms=MATCHSTYLE Set tag match style to EXACT, GLOB, LIKE, REGEXP
1523 ** u=USER Only show items associated with USER
1524 ** y=TYPE 'ci', 'w', 't', 'n', 'e', 'f', or 'all'.
1525 ** ss=VIEWSTYLE c: "Compact" v: "Verbose" m: "Modern" j: "Columnar"
1526 ** advm Use the "Advanced" or "Busy" menu design.
1527 ** ng No Graph.
1528 ** ncp Omit cherrypick merges
1529 ** nd Do not highlight the focus check-in
@@ -2140,10 +2143,11 @@
2143 }
2144 }
2145 }
2146 if( (zType[0]=='w' && !g.perm.RdWiki)
2147 || (zType[0]=='t' && !g.perm.RdTkt)
2148 || (zType[0]=='n' && !g.perm.RdTkt)
2149 || (zType[0]=='e' && !g.perm.RdWiki)
2150 || (zType[0]=='c' && !g.perm.Read)
2151 || (zType[0]=='g' && !g.perm.Read)
2152 || (zType[0]=='f' && !g.perm.RdForum)
2153 ){
@@ -2170,17 +2174,24 @@
2174 cSep = ',';
2175 }
2176 blob_append_sql(&cond, ")");
2177 }
2178 }else{ /* zType!="all" */
2179 if( zType[0]=='n' ){
2180 blob_append_sql(&cond,
2181 " AND event.type='t' AND event.comment GLOB 'New ticket*'");
2182 }else{
2183 blob_append_sql(&cond, " AND event.type=%Q", zType);
2184 }
2185 if( zType[0]=='c' ){
2186 zEType = "check-in";
2187 }else if( zType[0]=='w' ){
2188 zEType = "wiki";
2189 }else if( zType[0]=='t' ){
2190 zEType = "ticket change";
2191 }else if( zType[0]=='t' ){
2192 zEType = "new tickets";
2193 }else if( zType[0]=='e' ){
2194 zEType = "technical note";
2195 }else if( zType[0]=='g' ){
2196 zEType = "tag";
2197 }else if( zType[0]=='f' ){
2198

Keyboard Shortcuts

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