Fossil SCM
Have euser supersede user when preparing user report. This is for consistency with the other report updates, plus it makes more sense.
Commit
c8a249205ef5b601caf7d4d68afe4263db2f8eca
Parent
ed60255709de402…
1 file changed
+4
-4
+4
-4
| --- src/statrep.c | ||
| +++ src/statrep.c | ||
| @@ -406,12 +406,12 @@ | ||
| 406 | 406 | stats_report_event_types_menu("byuser", NULL); |
| 407 | 407 | @ <h1>Timeline Events |
| 408 | 408 | @ (%s(stats_report_label_for_type())) by User</h1> |
| 409 | 409 | db_multi_exec( |
| 410 | 410 | "CREATE TEMP TABLE piechart(amt,label);" |
| 411 | - "INSERT INTO piechart SELECT count(*), user FROM v_reports" | |
| 412 | - " GROUP BY user ORDER BY count(*) DESC;" | |
| 411 | + "INSERT INTO piechart SELECT count(*), ifnull(euser,user) FROM v_reports" | |
| 412 | + " GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;" | |
| 413 | 413 | ); |
| 414 | 414 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 415 | 415 | @ <center><svg width=700 height=400> |
| 416 | 416 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| 417 | 417 | @ </svg></centre><hr/> |
| @@ -422,14 +422,14 @@ | ||
| 422 | 422 | @ <th>User</th> |
| 423 | 423 | @ <th>Events</th> |
| 424 | 424 | @ <th width='90%%'><!-- relative commits graph --></th> |
| 425 | 425 | @ </tr></thead><tbody> |
| 426 | 426 | db_prepare(&query, |
| 427 | - "SELECT user, " | |
| 427 | + "SELECT ifnull(euser,user), " | |
| 428 | 428 | "COUNT(*) AS eventCount " |
| 429 | 429 | "FROM v_reports " |
| 430 | - "GROUP BY user ORDER BY eventCount DESC"); | |
| 430 | + "GROUP BY ifnull(euser,user) ORDER BY eventCount DESC"); | |
| 431 | 431 | while( SQLITE_ROW == db_step(&query) ){ |
| 432 | 432 | const int nCount = db_column_int(&query, 1); |
| 433 | 433 | if(nCount>nMaxEvents){ |
| 434 | 434 | nMaxEvents = nCount; |
| 435 | 435 | } |
| 436 | 436 |
| --- src/statrep.c | |
| +++ src/statrep.c | |
| @@ -406,12 +406,12 @@ | |
| 406 | stats_report_event_types_menu("byuser", NULL); |
| 407 | @ <h1>Timeline Events |
| 408 | @ (%s(stats_report_label_for_type())) by User</h1> |
| 409 | db_multi_exec( |
| 410 | "CREATE TEMP TABLE piechart(amt,label);" |
| 411 | "INSERT INTO piechart SELECT count(*), user FROM v_reports" |
| 412 | " GROUP BY user ORDER BY count(*) DESC;" |
| 413 | ); |
| 414 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 415 | @ <center><svg width=700 height=400> |
| 416 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| 417 | @ </svg></centre><hr/> |
| @@ -422,14 +422,14 @@ | |
| 422 | @ <th>User</th> |
| 423 | @ <th>Events</th> |
| 424 | @ <th width='90%%'><!-- relative commits graph --></th> |
| 425 | @ </tr></thead><tbody> |
| 426 | db_prepare(&query, |
| 427 | "SELECT user, " |
| 428 | "COUNT(*) AS eventCount " |
| 429 | "FROM v_reports " |
| 430 | "GROUP BY user ORDER BY eventCount DESC"); |
| 431 | while( SQLITE_ROW == db_step(&query) ){ |
| 432 | const int nCount = db_column_int(&query, 1); |
| 433 | if(nCount>nMaxEvents){ |
| 434 | nMaxEvents = nCount; |
| 435 | } |
| 436 |
| --- src/statrep.c | |
| +++ src/statrep.c | |
| @@ -406,12 +406,12 @@ | |
| 406 | stats_report_event_types_menu("byuser", NULL); |
| 407 | @ <h1>Timeline Events |
| 408 | @ (%s(stats_report_label_for_type())) by User</h1> |
| 409 | db_multi_exec( |
| 410 | "CREATE TEMP TABLE piechart(amt,label);" |
| 411 | "INSERT INTO piechart SELECT count(*), ifnull(euser,user) FROM v_reports" |
| 412 | " GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;" |
| 413 | ); |
| 414 | if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){ |
| 415 | @ <center><svg width=700 height=400> |
| 416 | piechart_render(700, 400, PIE_OTHER|PIE_PERCENT); |
| 417 | @ </svg></centre><hr/> |
| @@ -422,14 +422,14 @@ | |
| 422 | @ <th>User</th> |
| 423 | @ <th>Events</th> |
| 424 | @ <th width='90%%'><!-- relative commits graph --></th> |
| 425 | @ </tr></thead><tbody> |
| 426 | db_prepare(&query, |
| 427 | "SELECT ifnull(euser,user), " |
| 428 | "COUNT(*) AS eventCount " |
| 429 | "FROM v_reports " |
| 430 | "GROUP BY ifnull(euser,user) ORDER BY eventCount DESC"); |
| 431 | while( SQLITE_ROW == db_step(&query) ){ |
| 432 | const int nCount = db_column_int(&query, 1); |
| 433 | if(nCount>nMaxEvents){ |
| 434 | nMaxEvents = nCount; |
| 435 | } |
| 436 |