add sort criteria to columns joined to query
Merge pull request #2371 from opf/hotfix/wp_sorting_by_not_selected_column

add sort criteria to columns joined to query
Merge branch 'release/4.0' into dev

Signed-off-by: Alex Coles <alex@alexbcoles.com>

Conflicts:
	spec/features/work_packages/select_work_package_row_spec.rb