Minors performance fixes.
Refactor sortable collections (sql order).
Before the refactor this code :

Issue.paginated(...).includes(:version, :assigned_to, :status, :author, :category....).order('versions.name ASC')

produced :
SELECT * FROM issues LEFT OUTER JOIN versions ON versions.id = issues.version_id LEFT OUTER JOIN ................. WHERE ...

This made a single big query that was slow to manipulate.
It took ~650 - 800 ms to display a list of 100 issues.

NOW  it produce only :
SELECT * FROM issues LEFT OUTER JOIN versions ON versions.id = issues.version_id

SELECT * FROM users WHERE id IN (....)

etc.

It take ~250 - 350 ms to display a list of 100 issues. That much faster!