-
Notifications
You must be signed in to change notification settings - Fork 271
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
Conversation
@cubercsl for what type of clarifications was this a fix? |
Clarification associates either problem or contest. The existing code selects |
This is our hotfix between warmup and contest, but this may not occur in demoweb, I will verify this later. |
From a quick glance at the code I would assume the |
@vmcj I have repro this on demoweb, pls check it. Both clarification and clarification requests (not reference |
Co-authored-by: Soha Jin <soha@jin.sh>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give the rest a bit of time to look at it but I agree its broken.
@@ -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') |
There was a problem hiding this comment.
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')
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@Dup4 told me that the clarifications (send to all, with specific problem) can be displayed correctly on the team homepage in his shadow (of my instance). The picture below is his screenshot in shadow (login with DOMJudge team member) |
I found that we misunderstood the motivation of the At first, I think But since I investigated the codes today, I found the commit implements above codes: 0219d8e. This code fixes the issue mentioned in #2279, but I don't think this is a solution. Obviously, @vmcj misunderstood the usage of LEFT JOIN, and the fix for this issue is actually an accident. I'd like to draft a new PR to fix #2279 again. |
No description provided.