Fossil SCM
Add the "New Ticket" option to timeline displays.
Commit
9bb70584a1d7d2f7eca71e20674aa0a60b36802a061cfb67e99e11f33279de61
Parent
3d131528c8c0167…
1 file changed
+15
-4
+15
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -615,11 +615,12 @@ | ||
| 615 | 615 | cgi_printf("technote: "); |
| 616 | 616 | hyperlink_to_event_tagid(tagid<0?-tagid:tagid); |
| 617 | 617 | }else{ |
| 618 | 618 | cgi_printf("artifact: %z%S</a> ",href("%R/info/%!S",zUuid),zUuid); |
| 619 | 619 | } |
| 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'){ | |
| 621 | 622 | cgi_printf("artifact: %z%S</a> ",href("%R/info/%!S",zUuid),zUuid); |
| 622 | 623 | } |
| 623 | 624 | |
| 624 | 625 | if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){ |
| 625 | 626 | char *zLink = mprintf("%R/timeline?u=%h&c=%t&y=a", zDispUser, zDate); |
| @@ -1145,11 +1146,11 @@ | ||
| 1145 | 1146 | ** set the y= parameter that determines which elements to display |
| 1146 | 1147 | ** on the timeline. |
| 1147 | 1148 | */ |
| 1148 | 1149 | static void timeline_y_submenu(int isDisabled){ |
| 1149 | 1150 | static int i = 0; |
| 1150 | - static const char *az[14]; | |
| 1151 | + static const char *az[16]; | |
| 1151 | 1152 | if( i==0 ){ |
| 1152 | 1153 | az[0] = "all"; |
| 1153 | 1154 | az[1] = "Any Type"; |
| 1154 | 1155 | i = 2; |
| 1155 | 1156 | if( g.perm.Read ){ |
| @@ -1163,10 +1164,12 @@ | ||
| 1163 | 1164 | az[i++] = "Tech Notes"; |
| 1164 | 1165 | } |
| 1165 | 1166 | if( g.perm.RdTkt ){ |
| 1166 | 1167 | az[i++] = "t"; |
| 1167 | 1168 | az[i++] = "Tickets"; |
| 1169 | + az[i++] = "n"; | |
| 1170 | + az[i++] = "New Tickets"; | |
| 1168 | 1171 | } |
| 1169 | 1172 | if( g.perm.RdWiki ){ |
| 1170 | 1173 | az[i++] = "w"; |
| 1171 | 1174 | az[i++] = "Wiki"; |
| 1172 | 1175 | } |
| @@ -1516,11 +1519,11 @@ | ||
| 1516 | 1519 | ** rel Show related check-ins as well as those matching t=TAG |
| 1517 | 1520 | ** mionly Limit rel to show ancestors but not descendants |
| 1518 | 1521 | ** nowiki Do not show wiki associated with branch or tag |
| 1519 | 1522 | ** ms=MATCHSTYLE Set tag match style to EXACT, GLOB, LIKE, REGEXP |
| 1520 | 1523 | ** 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'. | |
| 1522 | 1525 | ** ss=VIEWSTYLE c: "Compact" v: "Verbose" m: "Modern" j: "Columnar" |
| 1523 | 1526 | ** advm Use the "Advanced" or "Busy" menu design. |
| 1524 | 1527 | ** ng No Graph. |
| 1525 | 1528 | ** ncp Omit cherrypick merges |
| 1526 | 1529 | ** nd Do not highlight the focus check-in |
| @@ -2140,10 +2143,11 @@ | ||
| 2140 | 2143 | } |
| 2141 | 2144 | } |
| 2142 | 2145 | } |
| 2143 | 2146 | if( (zType[0]=='w' && !g.perm.RdWiki) |
| 2144 | 2147 | || (zType[0]=='t' && !g.perm.RdTkt) |
| 2148 | + || (zType[0]=='n' && !g.perm.RdTkt) | |
| 2145 | 2149 | || (zType[0]=='e' && !g.perm.RdWiki) |
| 2146 | 2150 | || (zType[0]=='c' && !g.perm.Read) |
| 2147 | 2151 | || (zType[0]=='g' && !g.perm.Read) |
| 2148 | 2152 | || (zType[0]=='f' && !g.perm.RdForum) |
| 2149 | 2153 | ){ |
| @@ -2170,17 +2174,24 @@ | ||
| 2170 | 2174 | cSep = ','; |
| 2171 | 2175 | } |
| 2172 | 2176 | blob_append_sql(&cond, ")"); |
| 2173 | 2177 | } |
| 2174 | 2178 | }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 | + } | |
| 2176 | 2185 | if( zType[0]=='c' ){ |
| 2177 | 2186 | zEType = "check-in"; |
| 2178 | 2187 | }else if( zType[0]=='w' ){ |
| 2179 | 2188 | zEType = "wiki"; |
| 2180 | 2189 | }else if( zType[0]=='t' ){ |
| 2181 | 2190 | zEType = "ticket change"; |
| 2191 | + }else if( zType[0]=='t' ){ | |
| 2192 | + zEType = "new tickets"; | |
| 2182 | 2193 | }else if( zType[0]=='e' ){ |
| 2183 | 2194 | zEType = "technical note"; |
| 2184 | 2195 | }else if( zType[0]=='g' ){ |
| 2185 | 2196 | zEType = "tag"; |
| 2186 | 2197 | }else if( zType[0]=='f' ){ |
| 2187 | 2198 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -615,11 +615,12 @@ | |
| 615 | cgi_printf("technote: "); |
| 616 | hyperlink_to_event_tagid(tagid<0?-tagid:tagid); |
| 617 | }else{ |
| 618 | cgi_printf("artifact: %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: %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: "); |
| 616 | hyperlink_to_event_tagid(tagid<0?-tagid:tagid); |
| 617 | }else{ |
| 618 | cgi_printf("artifact: %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: %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 |