Opened 8 years ago

Last modified 5 years ago

#6693 new enhancement

Suggested query for checking ratings

Reported by: ibboard Owned by: Ryan J Ollos
Priority: low Component: FiveStarVotePlugin
Severity: normal Keywords: query
Cc: Trac Release: 0.11


As it stands, this hack creates all of the votes in a separate table. As I'm using the voting to rank tickets/bugs/features that people think are important, it is useful to get an overview of which tickets have what rating. My current query to do this is:

select id, type, summary, component, milestone, owner, (sum(||'/5' as rating, count(v.resource) as votes
from ticket t left join fivestarvote v on 'ticket/'|| = v.resource
group by
order by rating desc

It might be useful to include something like that in the default install, if possible, so that people can have easy access to the information.

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by Ryan J Ollos

Owner: changed from Dav Glass to Ryan J Ollos

comment:2 Changed 5 years ago by Steffen Hoffmann

An example report should be include, sure.

But note that moving towards an improved db schema like done for VotePlugin lately will obsolete non-portable string-concatenation inside the report SQL and save the hassle of providing db backend-specific versions of the report. The currently proposed statement will not work with MySQL IIRC.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Ryan J Ollos.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.