# TODO retrieve custom values in a single query like this and extend the work_packages inside the JSON:
# WorkPackage.includes(:custom_values).where(['work_packages.id in (?) AND custom_values.custom_field_id in (?)', @query.results.map(&:id), custom_field_columns.map(&:id)])