﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28560	distinct() on ordered queryset with restricted list of columns returns incorrect result	Mariusz Felisiak	Mariusz Felisiak	When `distinct()` is used with `values()` (or `values_list()`) on ordered queryset and a list of fields in `values()` doesn't contain all fields from `ORDER BY`, then it doesn't return correct result because columns from `ORDER BY` clause must be included in `SELECT`. As Simon suggested we should wrap a query in a subquery (see related tickets #7070, #5321).	Bug	assigned	Database layer (models, ORM)	dev	Normal		distinct values		Unreviewed	0	0	0	0	0	0
