Opened 12 years ago

Last modified 21 months ago

#6693 new enhancement

Suggested query for checking ratings

Reported by: ibboard Owned by:
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 (3)

comment:1 Changed 11 years ago by Ryan J Ollos

Owner: changed from Dav Glass to Ryan J Ollos

comment:2 Changed 9 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.

comment:3 Changed 21 months ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

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

Note: See TracTickets for help on using tickets.