I sometime use polls where I invite people to a gathering. There could however be a maximum number of attendees, so I’d like to see in what order they have replied, to enable me to see who answered first and therefor who can come.
Is there any way to see this or is there an attribute to make the avatars show up in the order people replied? I have tried to find an answer to this and apologies if it’s already explained elsewhere.
Thank you @cpradio, I do use this feature. This makes me able to see who has replied, but not in what order, since the avatar seems to be displayed in a random order.
Oh, I see, you will probably want to use a data explorer query. I think there is a query around here for extracting poll results, I’ll see if I can find it.
I was testing this on my system. Votes are already shown in vote order(aka created order). I tried making few polls and seeing their votes, they were shown in vote order itself.
Also from code, I can see that votes are returned in order of created_at.
Relevant code:
votes = DB.query <<~SQL
SELECT digest, user_id
FROM (
SELECT digest
, user_id
, ROW_NUMBER() OVER (PARTITION BY poll_option_id ORDER BY pv.created_at) AS row
FROM poll_votes pv
JOIN poll_options po ON pv.poll_option_id = po.id
WHERE pv.poll_id = #{poll.id}
AND po.poll_id = #{poll.id}
) v
WHERE row BETWEEN #{offset} AND #{offset + limit}
SQL