You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking at the corporate donors on https://www.djangoproject.com/fundraising/. The intent there is that, within each donation bracket, donors are meant to be sorted by donation amount, then alphabetically (e.g. so if a Silver donor donated $7,000, the'd be sorted above one who donated $5,000, even though both are in the Silver bracket).
However, responding to a question from a donor, I think I've discovered two problems:
The code actually sorts by total amount donated all time, not the current donation level:
And it doesn't appear to be working. I don't want to publish donation amounts, but anyone with access to the live site data should check out Bronze sponsors. The sort there appears purely alphabetical, but there are large differences in donation amounts there. (If whoever ends up debugging this doesn't have access to live donation data, feel free to contact me privately and I'll get you that access to debug.)
(1) is arguably by design and not a bug, so I'm gonna discuss this with the board and the fundraising team to double check that my understanding of the intent (sort by current donation amount, not total amount) is correct.
But (2) is definitely a bug -- the code clear intends to sort by donation amount, but the sort seems to be lost somewhere somehow.
The text was updated successfully, but these errors were encountered:
I always mess annotate up because it doesn't fit my brain. I don't see anything obvious, but may there is a default that's being weird that a filter kwargs might help work around. <-- totally grasping.
I'm having trouble reproducing the issue locally, and I don't have access to production data. @jacobian, could it be that some of the Invoices in question are past their expiration_date and aren't being summed? That's the only thing I can think of. CorporateMemberManager.for_public_display is called by the code you referenced, and it filters out expired Invoices here.
The order_by logic seems fine to me because the call at the end of for_public_display should overwrite the model's default ordering and persist through the dictionary construction until the template is rendered.
I'm looking at the corporate donors on https://www.djangoproject.com/fundraising/. The intent there is that, within each donation bracket, donors are meant to be sorted by donation amount, then alphabetically (e.g. so if a Silver donor donated $7,000, the'd be sorted above one who donated $5,000, even though both are in the Silver bracket).
However, responding to a question from a donor, I think I've discovered two problems:
djangoproject.com/members/models.py
Lines 76 to 93 in d068670
(1) is arguably by design and not a bug, so I'm gonna discuss this with the board and the fundraising team to double check that my understanding of the intent (sort by current donation amount, not total amount) is correct.
But (2) is definitely a bug -- the code clear intends to sort by donation amount, but the sort seems to be lost somewhere somehow.
The text was updated successfully, but these errors were encountered: