Unexpected sort order in moderation queue when "Priority" order is used

Steps to Reproduce

  1. Go to a community where you have admin privileges
  2. Customize the moderator queue priorities to give “Something Else” a priority of “Low”
  3. Customize the moderator queue priorities to give “Off-Topic” a priority of “Medium”
  4. Flag a post with “Something Else” as the reason and “Testing things out.” as the message
  5. Flag a different post with “Off-Topic” as the reason
  6. Navigate to the moderator review queue
  7. Ensure that “Status” is “Pending”
  8. Ensure that “Order by” is set to “Priority”
  9. Click “Refresh”

Expected: Moderator queue entries to be sorted from highest to lowest priority
Actual: Moderator queue entries are sorted from lowest to highest priority

Workaround: Setting “Order by” to “Priority (reverse)” sorts the flagged posts in the desired order, highest priority to lowest.

From a developer point of view, I can understand why the default sort order would be ascending and “reverse” would be descending. But I expected the opposite to be the case and I believe the average non-developer user would as well.

Possible solution: Rename “Priority” human text to “Priority (low to high)” and “Priority (reverse)” human text to “Priority (high to low)”

Related? Order of reviewed flags on review queue … but it is dealing primarily with “Status” set to “(all reviewed)”

4 Likes

It appears that this might be more insidious than I first guessed. If you follow the reproduction steps above and then do the following:

  1. Flag another post as “Something Else”
  2. Navigate to the moderator review queue
  3. Ensure that “Status” is “Pending”
  4. Ensure that “Order by” is set to “Priority”
  5. Click “Refresh”

Expected: Moderator queue entries be sorted in priority order
Actual: Moderator queue entries are sorted chronologically by time flagged (oldest to newest)

Additionally, “Priority (reverse)” sorts the entries chronologically by time flagged (newest to oldest).

2 Likes

Hi @lee-dohm :wave:

I couldn’t reproduce this issue locally with the steps you provided. After looking at the code, I confirmed that the Priority order is ascending, and Priority (reverse) descending. Also, when two items have the same priority, we order them by the created_at value in descending order.

Could you check if the something else flags have a higher score than the off-topic one? The formula takes different things into account to calculate the score.

Let me know and I’ll keep investigating if necessary!

3 Likes

You’re correct that when selecting “Priority” order, they appear to be sorted by their score in descending order, then by created_at in ascending order.

On the other hand, I still consider this to be unexpected behavior. Unless I’m missing something, a reviewable’s score is only available via database access (whether direct access or via the data-explorer plugin)?

You can see the reviewable score of each item by clicking on the ? icon that appears in the top right corner.

3 Likes

Thanks! That’s a very informative little view too :sparkling_heart:

Would using the word “Score” instead of “Priority” for the sort order make sense? Because you use the word “priorities” here:

But “scoring” here:

2 Likes