Skip to content

Add a Parking Lot #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions pgcommitfest/commitfest/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def patchlist(request, cf, personalized=False):
EXISTS (
SELECT 1 FROM commitfest_patch_authors cpa WHERE cpa.patch_id=p.id AND cpa.user_id=%(self)s
) AND (
poc.commitfest_id < %(cid)s
cf.status = %(status_closed)s
)
THEN 'Your still open patches in a closed commitfest (you should move or close these)'
WHEN
Expand All @@ -349,6 +349,7 @@ def patchlist(request, cf, personalized=False):
cf.name AS cf_name,
cf.status AS cf_status,
"""
whereparams["status_closed"] = CommitFest.STATUS_CLOSED
whereparams["needs_author"] = PatchOnCommitFest.STATUS_AUTHOR
whereparams["needs_committer"] = PatchOnCommitFest.STATUS_COMMITTER
is_committer = bool(Committer.objects.filter(user=request.user, active=True))
Expand Down Expand Up @@ -515,7 +516,13 @@ def commitfest(request, cfid):
# Generate patch status summary.
curs = connection.cursor()
curs.execute(
"SELECT ps.status, ps.statusstring, count(*) FROM commitfest_patchoncommitfest poc INNER JOIN commitfest_patchstatus ps ON ps.status=poc.status WHERE commitfest_id=%(id)s GROUP BY ps.status ORDER BY ps.sortkey",
"""SELECT ps.status, ps.statusstring, count(*)
FROM commitfest_patchoncommitfest poc
INNER JOIN commitfest_patchstatus ps ON ps.status=poc.status
INNER JOIN commitfest_commitfest cf ON cf.id=poc.commitfest_id
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm probably missing something obvious, but why was this join added? The cf doesn't actually seem to be used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used in patchlist() here, during personalization. (I'm not a huge fan of the long-distance coupling, but...)

WHERE commitfest_id=%(id)s
GROUP BY ps.status
ORDER BY ps.sortkey""",
{
"id": cf.id,
},
Expand Down