Skip to content
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

Import relative contest times #2221

Closed
wants to merge 6 commits into from
Closed
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
1 change: 1 addition & 0 deletions webapp/src/Entity/Contest.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ public function setStarttimeString(string $starttimeString): Contest
{
$this->starttimeString = $starttimeString;

$this->starttime = $this->getAbsoluteTime($starttimeString);
Copy link
Member

Choose a reason for hiding this comment

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

If this wasn't here to begin with, I'm wondering if there was maybe a good reason for this.

Copy link
Member

Choose a reason for hiding this comment

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

I think in general if we want the same/similar logic for the UI and API, then we should rethink where and how parsing the input is handled in a common place. It feels that this is duplicating code in the import service that's already existing in other places.

Copy link
Member Author

Choose a reason for hiding this comment

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

If this wasn't here to begin with, I'm wondering if there was maybe a good reason for this.

I had the same question, so I was planning to not merge this PR before having discussed this at the hackathon.

I think in general if we want the same/similar logic for the UI and API, then we should rethink where and how parsing the input is handled in a common place. It feels that this is duplicating code in the import service that's already existing in other places.

I agree, but than I prefer to move this one for after the release as mentioned in the commit message.

$this->setActivatetimeString($this->getActivatetimeString());
$this->setFreezetimeString($this->getFreezetimeString());
$this->setEndtimeString($this->getEndtimeString());
Expand Down