Modify ↓
#4364 closed enhancement (duplicate)
SQL for report to sort tickets based on number of votes
| Reported by: | Luke Schierer | Owned by: | Ryan J Ollos |
|---|---|---|---|
| Priority: | normal | Component: | VotePlugin |
| Severity: | normal | Keywords: | |
| Cc: | vincent | Trac Release: | 0.11 |
Description
It would be awesome if you could sort tickets based on the number of votes they have received.
Attachments (0)
Change History (8)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
here is some draft
SELECT ticket.id AS ticket , COUNT(votes.resource) AS vote, status, severity, priority, owner, time as created, summary
| ticket.id = votes.resource) |
WHERE ticket.status IN ('new', 'assigned', 'reopened')
GROUP BY ticket.id ORDER BY vote DESC
comment:3 Changed 16 years ago by
| Cc: | vincent added; anonymous removed |
|---|
comment:4 Changed 15 years ago by
| Owner: | changed from Alec Thomas to Ryan J Ollos |
|---|
Reassigning ticket to new maintainer.
comment:6 Changed 15 years ago by
| Resolution: | worksforme |
|---|---|
| Status: | closed → reopened |
comment:7 Changed 15 years ago by
| Resolution: | → duplicate |
|---|---|
| Status: | reopened → closed |
comment:8 Changed 15 years ago by
| Summary: | sort tickets by votes → SQL for report to sort tickets based on number of votes |
|---|
Note: See
TracTickets for help on using
tickets.



what about his ticket? There you find a sample SQL query #3655