﻿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
17839	Ordering by an expression containing annotations	joseph.helfer@…	nobody	"I have found a query use case which seems not to be covered by query() and extra().[[BR]]
I have two annotations: `.annotate(x=Count('foo'))` and `.annotate(y=Count('bar'))` and I want to do something like
`.order_by(F('x')+F('y'))`.[[BR]]
This (as written) doesn't work, however, because `order_by` only takes strings.[[BR]]
Another solution would be to use `.extra(select={z: 'x + y'})` and then `.extra(order_by=['z'])`, but that doesn't work either, because `extra` can't refer to annotations."	New feature	closed	Database layer (models, ORM)	1.3	Normal	wontfix		mbertheau@…	Unreviewed	0	0	0	0	0	0
