Skip to content

fix: no clarfication on team dashboard #2600

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
6 changes: 2 additions & 4 deletions webapp/src/Controller/Team/MiscController.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ public function homeAction(Request $request): Response
->leftJoin('c.sender', 's')
->leftJoin('c.recipient', 'r')
->select('c', 'cp', 'p')
->andWhere('c.contest = :contest')
->andWhere('cp.contest = :contest')
->andWhere('c.contest = :contest OR cp.contest = :contest')
Copy link
Member

Choose a reason for hiding this comment

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

General question about the existing code:
When would ever cp.contest match $contest, but c.contest not? That is, why can't we just have

->andWhere('c.contest = :contest')

Copy link
Member

Choose a reason for hiding this comment

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

When you unlink a problem from a contest is the only way I can think of.

Copy link
Contributor

Choose a reason for hiding this comment

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

this was implemented in 0219d8e

->andWhere('c.sender IS NULL')
->andWhere('c.recipient = :team OR c.recipient IS NULL')
->setParameter('contest', $contest)
Expand All @@ -122,8 +121,7 @@ public function homeAction(Request $request): Response
->leftJoin('c.sender', 's')
->leftJoin('c.recipient', 'r')
->select('c', 'cp', 'p')
->andWhere('c.contest = :contest')
->andWhere('cp.contest = :contest')
->andWhere('c.contest = :contest OR cp.contest = :contest')
->andWhere('c.sender = :team')
->setParameter('contest', $contest)
->setParameter('team', $team)
Expand Down
Loading