Skip to content

Update changelog (+1 squashed commit)

What does this MR do?

Orders users who have not yet logged in to the bottom of the list when ordering by recent sign in or oldest sign in.

Are there points in the code the reviewer needs to double check?

This scope makes it tricky to use the ActiveRecord#last method as this re-orders clumsily (see https://coderwall.com/p/hm4kwg/never-use-activerecord-s-last), that's why the spec picks the 3rd relation object as opposed to checking with .last

I'm happy to refactor quickly with a preferred method (eg. using NULLS LAST), this is a notoriously problematic issue with ActiveRecord.

It's my first contribution... go easy :)

Why was this MR needed?

The default sort criteria wasn't matching the expected behaviour

What are the relevant issue numbers?

#1334 (closed)

Screenshots (if relevant)

N/a

Does this MR meet the acceptance criteria?

Merge request reports