Modify

Opened 5 years ago

Last modified 18 months ago

#6693 new enhancement

Suggested query for checking ratings

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

Description

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(v.vote)/count(v.resource))||'/5' as rating, count(v.resource) as votes
from ticket t left join fivestarvote v on 'ticket/'||t.id = v.resource
group by t.id
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 (1)

a.jpg (754.3 KB) - added by anonymous 23 months ago.
xxx

Download all attachments as: .zip

Change History (3)

comment:1 Changed 4 years ago by rjollos

  • Owner changed from davglass to rjollos

Changed 23 months ago by anonymous

xxx

comment:2 Changed 18 months ago by hasienda

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.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.