Attendance Badges
-
Any chance these top 3 can be sorted correctly?
-
I am almost inclined to call the whoosh bailiff onto you.
Do you realise how many pints @PJH had to go through to get them sorted just so?
-
Any chance these top 3 can be sorted correctly?
Since the space I deliberately put in front of the 7 when I created the badges doesn't appear to do anything, no.
-
As in, that's the best he could do? Or it's wrong on purpose?
And to be fair, that's probably before I signed up.
-
Try
007% Attendance
?Filed Under: I'd consider wearing that badge if you do
-
Try 007% Attendance?
Hmm. That doesn't seem to have done it. And I have no idea what the sorting order is based off...
[pjh@sofa ~]$ psql -d discourse -c "select id, badge_type_id, name from badges where badge_grouping_id=16 order by badge_type_id desc, id asc" id | badge_type_id | name -----+---------------+----------------- 154 | 3 | 50% Attendance 155 | 3 | 7% Attendance 156 | 3 | 31% Attendance 153 | 2 | 100% Attendance 157 | 2 | 150% Attendance 160 | 2 | 257% Attendance 161 | 1 | 356% Attendance (7 rows) [pjh@sofa ~]$
-
_7%?
-
-
That doesn't seem to have done it.
But it looks cooler
And I have no idea what the sorting order is based off...
Did you create the 7% badge last and it sorts by creation date?paging @riking @Sam @eviltrout
Filed Under: One of the many mysteries about Discourse is it's sorting algorithm.
-
Or it's wrong on purpose?
That's what I've always believed, anyway.
And to be fair, that's probably before I signed up.
You have the advantage of me with a month.
-
id
?Nope - not from that query I posted.
Did you create the 7% badge last and it sorts by creation date?
Nope - creation date follows
id
-
And I have no idea what the sorting order is based off...
I would have guessed ASCII (including the spaces), but now I am not so sure anymore. Kilkenny?
-
Nope - not from that query I posted.
order by badge_type_id desc, id asc
You sure?
-
You sure?
Yes. Of the three Bronze, if id/creation date were the order, the 7% would be between the other two.
[pjh@sofa ~]$ psql -d discourse -c "select id, created_at, badge_type_id, name from badges where badge_grouping_id=16 order by badge_type_id desc, id asc" id | created_at | badge_type_id | name -----+----------------------------+---------------+----------------- 154 | 2014-09-19 14:27:33.116822 | 3 | 50% Attendance 155 | 2014-09-19 14:28:42.535594 | 3 | 7% Attendance 156 | 2014-09-19 14:30:16.871703 | 3 | 31% Attendance 153 | 2014-08-21 11:53:57.582935 | 2 | 100% Attendance 157 | 2014-10-14 10:42:52.254646 | 2 | 150% Attendance 160 | 2014-10-15 14:19:47.18321 | 2 | 257% Attendance 161 | 2014-10-15 14:22:29.089307 | 1 | 356% Attendance (7 rows) [pjh@sofa ~]$
-
Sorry, I thought you posted the query that is actually used by Discourse for the ordering (without looking at the OP)
-
Are there any spurious characters in the badge_type_id on the 50%?
-
Think I've sorted it - I removed the spaces before the 31% and 50% and it seems to have ordered them as desired...
-
Good work, I'll sleep better tonight.
Now, where's my money?
-
Now, where's my money?
the check is in the mail. please allow four to six millennia for delivery.
-
Can we sort badges by IsKbd desc, badgetype?
-
Beyond the badge names and types i have no control over order.
-
Badge names contain , you can do better than that pjh.
-
I thought this sort of thing was par for the
Discourse