Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#32618 closed Cleanup/optimization (fixed)

Aggregation documentation should mention conditional aggregation

Reported by: Simon Willison Owned by: Hasan Ramezani
Component: Documentation Version: 3.2
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Change History (5)

comment:2 by Mariusz Felisiak, 3 years ago

Easy pickings: set
Needs documentation: unset
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

There is also an example in the Cheat sheet. A small reference should be enough, e.g.

diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt
index cc6310052a..2e882e2a1a 100644
--- a/docs/topics/db/aggregation.txt
+++ b/docs/topics/db/aggregation.txt
@@ -354,7 +354,7 @@ authors with a count of highly rated books::
     >>> Author.objects.annotate(num_books=Count('book'), highly_rated_books=highly_rated)
 
 Each ``Author`` in the result set will have the ``num_books`` and
-``highly_rated_books`` attributes.
+``highly_rated_books`` attributes. See also :ref:`conditional-aggregation`.
 
 .. admonition:: Choosing between ``filter`` and ``QuerySet.filter()``

What do you think?

comment:3 by Hasan Ramezani, 3 years ago

Has patch: set
Owner: changed from nobody to Hasan Ramezani
Status: newassigned
Last edited 3 years ago by Mariusz Felisiak (previous) (diff)

comment:4 by GitHub <noreply@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 1351f2e:

Fixed #32618 -- Added link to conditional aggregation in aggregation topic guide.

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In 078bcd58:

[3.2.x] Fixed #32618 -- Added link to conditional aggregation in aggregation topic guide.

Backport of 1351f2ee163145df2cf5471eb3e57289f8853512 from main

Note: See TracTickets for help on using tickets.
Back to Top