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

Add location to team API. #2296

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

nickygerritsen
Copy link
Member

Fixes #2283.
Also rename room to location in database and UI to be more consistent.

@nickygerritsen nickygerritsen requested a review from vmcj January 12, 2024 10:21
Copy link
Member

@vmcj vmcj left a comment

Choose a reason for hiding this comment

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

I think this is small enough that we don't need DJ9

@cubercsl
Copy link
Contributor

#1327 (comment)

Maybe we should not change room to location?

For location we could call it room (that's how it is called internally). Or name it something else, as long as it is not location.

@nickygerritsen
Copy link
Member Author

#1327 (comment)

Maybe we should not change room to location?

For location we could call it room (that's how it is called internally). Or name it something else, as long as it is not location.

You are right. I will think about what we should do

Nicky Gerritsen added 2 commits January 16, 2024 15:09
Fixes DOMjudge#2283.
Also rename room to location in database and UI to be more consistent.
@@ -854,7 +854,7 @@ public function importTeamsJson(array $data, ?string &$message = null, ?array &$
'name' => @$team['name'],
'display_name' => @$team['display_name'],
'publicdescription' => $team['public_description'] ?? @$team['members'],
'room' => @$team['room'],
'location' => @$team['location']['description'],
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way how we can now just if unset pick the x,y,rot and put it as a string?

Copy link
Contributor

@cubercsl cubercsl Jan 17, 2024

Choose a reason for hiding this comment

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

Usually we use the seat number (such as B05) for the location here, but x, y, rot in the ccs spec represent distance and rotation angle. I don't think they correspond well directly.

Copy link
Member

Choose a reason for hiding this comment

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

You can already use the description field, so for your usecase you would put the seat number there (or would you still need more?)

I'm suggesting the situation where that field is not set and the spec is followed. During the ICPC WF we would get the information in DOMjudge without much extra effort so we know where a team would be located in case of problems.

Copy link
Member Author

Choose a reason for hiding this comment

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

But then if you import + export you get something else, while it would be nice if it's idempotent?

Copy link
Contributor

@cubercsl cubercsl Jan 17, 2024

Choose a reason for hiding this comment

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

You can already use the description field, so for your usecase you would put the seat number there (or would you still need more?)

AFAIK, the room is formally used in built-in printing and balloon service.

@nickygerritsen nickygerritsen added this pull request to the merge queue Jan 19, 2024
Merged via the queue into DOMjudge:main with commit d90f594 Jan 19, 2024
18 checks passed
@nickygerritsen nickygerritsen deleted the team-location-in-api branch January 19, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose room via team endpoint in API
3 participants