Modify ↓
#4364 closed enhancement (duplicate)
SQL for report to sort tickets based on number of votes
| Reported by: | lschiere | Owned by: | rjollos |
|---|---|---|---|
| Priority: | normal | Component: | VotePlugin |
| Severity: | normal | Keywords: | |
| Cc: | grone | 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 4 years ago by anonymous
comment:2 Changed 4 years ago by anonymous
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 4 years ago by grone
- Cc grone added
comment:4 Changed 3 years ago by rjollos
- Owner changed from athomas to rjollos
Reassigning ticket to new maintainer.
comment:5 Changed 3 years ago by rjollos
- Resolution set to worksforme
- Status changed from new to closed
comment:6 Changed 3 years ago by rjollos
- Resolution worksforme deleted
- Status changed from closed to reopened
comment:7 Changed 3 years ago by rjollos
- Resolution set to duplicate
- Status changed from reopened to closed
comment:8 Changed 3 years ago by rjollos
- Summary changed from sort tickets by votes to 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