From 5a5ffd245870605c24e777111eaa77d588a3c39c Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 12 Jan 2024 11:20:53 +0100 Subject: [PATCH 1/2] Add location to team API. Fixes #2283. Also rename room to location in database and UI to be more consistent. --- ChangeLog | 1 + doc/manual/import.rst | 4 +-- webapp/migrations/Version20240112100916.php | 36 +++++++++++++++++++ webapp/public/js/domjudge.js | 2 +- .../src/Controller/Jury/BalloonController.php | 6 ++-- .../Controller/Jury/JuryMiscController.php | 10 +++--- webapp/src/Controller/Jury/TeamController.php | 2 +- webapp/src/Controller/Team/MiscController.php | 2 +- .../Test/AddLocationToTeamFixture.php | 16 +++++++++ webapp/src/Entity/Team.php | 13 +++---- webapp/src/Form/Type/TeamType.php | 2 +- webapp/src/Service/BalloonService.php | 4 +-- webapp/src/Service/DOMJudgeService.php | 4 +-- webapp/src/Service/ICPCCmsService.php | 4 +-- webapp/src/Service/ImportExportService.php | 2 +- webapp/templates/jury/balloons.html.twig | 4 +-- .../jury/partials/team_form.html.twig | 2 +- webapp/templates/jury/team.html.twig | 4 +-- webapp/templates/partials/team.html.twig | 4 +-- .../Controller/API/TeamControllerTest.php | 4 +++ .../Controller/Jury/TeamControllerTest.php | 12 +++---- .../Unit/Service/ImportExportServiceTest.php | 12 +++---- 22 files changed, 104 insertions(+), 46 deletions(-) create mode 100644 webapp/migrations/Version20240112100916.php create mode 100644 webapp/src/DataFixtures/Test/AddLocationToTeamFixture.php diff --git a/ChangeLog b/ChangeLog index 6e3e5f344f..2d16454641 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,7 @@ Version 8.3.0DEV - Fix medal awards when skipping categories. - Add direct button to public page for registering when enabled. - Scale batch size of judge tasks dynamically. + - Rename room to location for teams. Version 8.2.0 - 6 March 2023 ---------------------------- diff --git a/doc/manual/import.rst b/doc/manual/import.rst index 6cfaa1f0f1..11878e11db 100644 --- a/doc/manual/import.rst +++ b/doc/manual/import.rst @@ -166,7 +166,7 @@ fields: - ``display_name`` (optional): the team display name. If provided, will display this instead of the team name in certain places, like the scoreboard - ``organization_id``: the ID of the team affiliation this team belongs to -- ``room`` (optional): the room of the team +- ``location`` (optional): the location of the team If the ``data_source`` setting of DOMjudge is set to external, the ``id`` field will be the ID used for the team and the ``group_ids`` and ``organization_id`` fields are the values as @@ -183,7 +183,7 @@ Example ``teams.json``:: "group_ids": ["24"], "name": "¡i¡i¡", "organization_id": "INST-42", - "room": "AUD 10" + "location": "AUD 10" }, { "id": "2", "icpc_id": "447837", diff --git a/webapp/migrations/Version20240112100916.php b/webapp/migrations/Version20240112100916.php new file mode 100644 index 0000000000..0ff4776a5c --- /dev/null +++ b/webapp/migrations/Version20240112100916.php @@ -0,0 +1,36 @@ +addSql('ALTER TABLE team CHANGE room location VARCHAR(255) DEFAULT NULL COMMENT \'Physical location of team\''); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE team CHANGE location room VARCHAR(255) DEFAULT NULL COMMENT \'Physical location of team\''); + } + + public function isTransactional(): bool + { + return false; + } +} diff --git a/webapp/public/js/domjudge.js b/webapp/public/js/domjudge.js index bd1b254320..891faf7abc 100644 --- a/webapp/public/js/domjudge.js +++ b/webapp/public/js/domjudge.js @@ -658,7 +658,7 @@ function updateMenuBalloons(data) $("#num-alerts-balloons").html(num); $("#num-alerts-balloons").show(); for (var i=0; iem->createQueryBuilder() - ->from(Team::class, 'a', 'a.room') + ->from(Team::class, 'a', 'a.location') ->select('a') - ->where('a.room IN (:rooms)') - ->setParameter('rooms', $filters['location-str']) + ->where('a.location IN (:locations)') + ->setParameter('locations', $filters['location-str']) ->getQuery() ->getResult(); } diff --git a/webapp/src/Controller/Jury/JuryMiscController.php b/webapp/src/Controller/Jury/JuryMiscController.php index a75d455141..d24863f573 100644 --- a/webapp/src/Controller/Jury/JuryMiscController.php +++ b/webapp/src/Controller/Jury/JuryMiscController.php @@ -83,15 +83,15 @@ public function ajaxDataAction(Request $request, string $datatype): JsonResponse }, $affiliations); } elseif ($datatype === 'locations') { $locations = $qb->from(Team::class, 'a') - ->select('DISTINCT a.room') - ->where($qb->expr()->like('a.room', '?1')) - ->orderBy('a.room', 'ASC') + ->select('DISTINCT a.location') + ->where($qb->expr()->like('a.location', '?1')) + ->orderBy('a.location', 'ASC') ->getQuery()->setParameter(1, '%' . $q . '%') ->getResult(); $results = array_map(fn(array $location) => [ - 'id' => $location['room'], - 'text' => $location['room'] + 'id' => $location['location'], + 'text' => $location['location'] ], $locations); } elseif (!$this->isGranted('ROLE_JURY')) { throw new AccessDeniedHttpException('Permission denied'); diff --git a/webapp/src/Controller/Jury/TeamController.php b/webapp/src/Controller/Jury/TeamController.php index 76ab5c6283..8e22f76896 100644 --- a/webapp/src/Controller/Jury/TeamController.php +++ b/webapp/src/Controller/Jury/TeamController.php @@ -93,7 +93,7 @@ public function indexAction(): Response 'affiliation' => ['title' => 'affiliation', 'sort' => true,], 'num_contests' => ['title' => '# contests', 'sort' => true,], 'ip_address' => ['title' => 'last IP', 'sort' => true,], - 'room' => ['title' => 'room', 'sort' => true,], + 'location' => ['title' => 'location', 'sort' => true,], 'status' => ['title' => '', 'sort' => false,], 'stats' => ['title' => 'stats', 'sort' => true,], ]; diff --git a/webapp/src/Controller/Team/MiscController.php b/webapp/src/Controller/Team/MiscController.php index 9e05eaeaba..46be78ec5c 100644 --- a/webapp/src/Controller/Team/MiscController.php +++ b/webapp/src/Controller/Team/MiscController.php @@ -184,7 +184,7 @@ public function printAction(Request $request): Response $teamId = (string)$team->getTeamid(); } $ret = $this->dj->printFile($realfile, $originalfilename, $langid, - $username, $team->getEffectiveName(), $teamId, $team->getRoom()); + $username, $team->getEffectiveName(), $teamId, $team->getLocation()); return $this->render('team/print_result.html.twig', [ 'success' => $ret[0], diff --git a/webapp/src/DataFixtures/Test/AddLocationToTeamFixture.php b/webapp/src/DataFixtures/Test/AddLocationToTeamFixture.php new file mode 100644 index 0000000000..806bbb206a --- /dev/null +++ b/webapp/src/DataFixtures/Test/AddLocationToTeamFixture.php @@ -0,0 +1,16 @@ +getRepository(Team::class)->findOneBy(['name' => 'Example teamname']); + $team->setLocation('Utrecht'); + $manager->flush(); + } +} diff --git a/webapp/src/Entity/Team.php b/webapp/src/Entity/Team.php index c2f6619601..73c749f47e 100644 --- a/webapp/src/Entity/Team.php +++ b/webapp/src/Entity/Team.php @@ -87,8 +87,9 @@ class Team extends BaseApiEntity implements ExternalRelationshipEntityInterface, private ?string $publicDescription = null; #[ORM\Column(nullable: true, options: ['comment' => 'Physical location of team'])] - #[Serializer\Exclude] - private ?string $room = null; + #[OA\Property(nullable: true)] + #[Serializer\Groups([ARC::GROUP_NONSTRICT])] + private ?string $location = null; #[ORM\Column( name: 'internalcomments', @@ -285,15 +286,15 @@ public function getPublicDescription(): ?string return $this->publicDescription; } - public function setRoom(?string $room): Team + public function setLocation(?string $location): Team { - $this->room = $room; + $this->location = $location; return $this; } - public function getRoom(): ?string + public function getLocation(): ?string { - return $this->room; + return $this->location; } public function setInternalComments(?string $comments): Team diff --git a/webapp/src/Form/Type/TeamType.php b/webapp/src/Form/Type/TeamType.php index 17b98cb528..5a5cdde162 100644 --- a/webapp/src/Form/Type/TeamType.php +++ b/webapp/src/Form/Type/TeamType.php @@ -82,7 +82,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void $builder->add('penalty', IntegerType::class, [ 'label' => 'Penalty time', ]); - $builder->add('room', TextType::class, [ + $builder->add('location', TextType::class, [ 'label' => 'Location', 'required' => false, ]); diff --git a/webapp/src/Service/BalloonService.php b/webapp/src/Service/BalloonService.php index 3a824eb056..c269d85cfe 100644 --- a/webapp/src/Service/BalloonService.php +++ b/webapp/src/Service/BalloonService.php @@ -92,7 +92,7 @@ public function collectBalloonTable(Contest $contest, bool $todo = false): array $query = $em->createQueryBuilder() ->select('b', 's.submittime', 'p.probid', - 't.teamid', 's', 't', 't.room', + 't.teamid', 's', 't', 't.location', 'c.categoryid AS categoryid', 'c.name AS catname', 'co.cid', 'co.shortname', 'cp.shortname AS probshortname', 'cp.color', @@ -159,7 +159,7 @@ public function collectBalloonTable(Contest $contest, bool $todo = false): array $balloondata['contestproblem'] = $balloon->getSubmission()->getContestProblem(); $balloondata['team'] = $balloon->getSubmission()->getTeam(); $balloondata['teamid'] = $balloonsData['teamid']; - $balloondata['location'] = $balloonsData['room']; + $balloondata['location'] = $balloonsData['location']; $balloondata['affiliation'] = $balloonsData['affilshort']; $balloondata['affiliationid'] = $balloonsData['affilid']; $balloondata['category'] = $balloonsData['catname']; diff --git a/webapp/src/Service/DOMJudgeService.php b/webapp/src/Service/DOMJudgeService.php index 02be143d6c..ef2ae71357 100644 --- a/webapp/src/Service/DOMJudgeService.php +++ b/webapp/src/Service/DOMJudgeService.php @@ -410,7 +410,7 @@ public function getUpdates(): array if ($this->checkrole('balloon')) { $balloonsQuery = $this->em->createQueryBuilder() - ->select('b.balloonid', 't.name', 't.room', 'p.name AS pname') + ->select('b.balloonid', 't.name', 't.location', 'p.name AS pname') ->from(Balloon::class, 'b') ->leftJoin('b.submission', 's') ->leftJoin('s.problem', 'p') @@ -714,7 +714,7 @@ public function openZipFile(string $filename): ZipArchive * @param string $username Username of the print job submitter * @param string|null $teamname Teamname of the team this user belongs to, if any * @param string|null $teamid Teamid of the team this user belongs to, if any - * @param string|null $location Room/place of the team, if any. + * @param string|null $location Location of the team, if any. */ public function printFile( string $filename, diff --git a/webapp/src/Service/ICPCCmsService.php b/webapp/src/Service/ICPCCmsService.php index 207403182b..ff5c308deb 100644 --- a/webapp/src/Service/ICPCCmsService.php +++ b/webapp/src/Service/ICPCCmsService.php @@ -115,7 +115,7 @@ public function importTeams(string $token, string $contest, ?string &$message = ->setEnabled($enabled) ->setInternalComments('Status: ' . $teamData['status']) ->setIcpcid($teamData['teamId']) - ->setRoom($siteName); + ->setLocation($siteName); $this->em->persist($team); $this->em->flush(); $username = sprintf("team%04d", $team->getTeamid()); @@ -137,7 +137,7 @@ public function importTeams(string $token, string $contest, ?string &$message = ->setEnabled($enabled) ->setInternalComments('Status: ' . $teamData['status']) ->setIcpcid($teamData['teamId']) - ->setRoom($siteName); + ->setLocation($siteName); $user = $this->em->getRepository(User::class)->findOneBy(['username' => $username]); $user?->setName($teamData['teamName']); diff --git a/webapp/src/Service/ImportExportService.php b/webapp/src/Service/ImportExportService.php index f89176601f..e33b1e40d8 100644 --- a/webapp/src/Service/ImportExportService.php +++ b/webapp/src/Service/ImportExportService.php @@ -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'], ], 'team_affiliation' => [ 'externalid' => $team['organization_id'] ?? null, diff --git a/webapp/templates/jury/balloons.html.twig b/webapp/templates/jury/balloons.html.twig index 0d51e9888d..d1a1011cee 100644 --- a/webapp/templates/jury/balloons.html.twig +++ b/webapp/templates/jury/balloons.html.twig @@ -46,8 +46,8 @@ diff --git a/webapp/templates/jury/partials/team_form.html.twig b/webapp/templates/jury/partials/team_form.html.twig index 69cbea4d30..0ad3c08775 100644 --- a/webapp/templates/jury/partials/team_form.html.twig +++ b/webapp/templates/jury/partials/team_form.html.twig @@ -12,7 +12,7 @@ {{ form_row(form.publicdescription) }} {{ form_row(form.affiliation) }} {{ form_row(form.penalty) }} - {{ form_row(form.room) }} + {{ form_row(form.location) }} {{ form_row(form.internalcomments) }} {{ form_row(form.contests) }} {{ form_row(form.enabled) }} diff --git a/webapp/templates/jury/team.html.twig b/webapp/templates/jury/team.html.twig index b6971a3b1c..063dc3c558 100644 --- a/webapp/templates/jury/team.html.twig +++ b/webapp/templates/jury/team.html.twig @@ -85,10 +85,10 @@ {{ team.penalty }} {% endif %} - {% if team.room %} + {% if team.location %} Location - {{ team.room }} + {{ team.location }} {% endif %} diff --git a/webapp/templates/partials/team.html.twig b/webapp/templates/partials/team.html.twig index 5ceaa84043..be3bf714da 100644 --- a/webapp/templates/partials/team.html.twig +++ b/webapp/templates/partials/team.html.twig @@ -45,10 +45,10 @@ {% endif %} {% endif %} - {% if team.room is not empty %} + {% if team.location is not empty %} Location - {{ team.room }} + {{ team.location }} {% endif %} diff --git a/webapp/tests/Unit/Controller/API/TeamControllerTest.php b/webapp/tests/Unit/Controller/API/TeamControllerTest.php index 46bb47ada1..f172607e99 100644 --- a/webapp/tests/Unit/Controller/API/TeamControllerTest.php +++ b/webapp/tests/Unit/Controller/API/TeamControllerTest.php @@ -2,6 +2,7 @@ namespace App\Tests\Unit\Controller\API; +use App\DataFixtures\Test\AddLocationToTeamFixture; use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\File\UploadedFile; @@ -21,9 +22,12 @@ class TeamControllerTest extends BaseTestCase 'display_name' => null, 'members' => null, 'photo' => null, + 'location' => 'Utrecht', ], ]; + protected static array $fixtures = [AddLocationToTeamFixture::class]; + protected array $expectedAbsent = ['4242', 'nonexistent']; public function testLogoManagement(): void diff --git a/webapp/tests/Unit/Controller/Jury/TeamControllerTest.php b/webapp/tests/Unit/Controller/Jury/TeamControllerTest.php index 8c248df8cd..c90d4e8a01 100644 --- a/webapp/tests/Unit/Controller/Jury/TeamControllerTest.php +++ b/webapp/tests/Unit/Controller/Jury/TeamControllerTest.php @@ -18,7 +18,7 @@ class TeamControllerTest extends JuryControllerTestCase protected static string $className = Team::class; protected static array $DOM_elements = ['h1' => ['Teams']]; protected static string $addForm = 'team['; - protected static array $addEntitiesShown = ['icpcid', 'label', 'displayName', 'room']; + protected static array $addEntitiesShown = ['icpcid', 'label', 'displayName', 'location']; protected static array $overviewSingleNotShown = ['addUserForTeam']; protected static array $overviewGeneralNotShown = ['icpcid']; protected static array $addEntitiesCount = ['contests']; @@ -27,7 +27,7 @@ class TeamControllerTest extends JuryControllerTestCase 'category' => '3', 'publicdescription' => 'Some members', 'penalty' => '0', - 'room' => 'The first room', + 'location' => 'The first room', 'internalcomments' => 'This is a team without a user', 'contests' => [], 'enabled' => '1', @@ -38,7 +38,7 @@ class TeamControllerTest extends JuryControllerTestCase 'category' => '1', 'publicdescription' => 'More members', 'penalty' => '20', - 'room' => 'Another room', + 'location' => 'Another room', 'internalcomments' => 'This is a team with a user', 'enabled' => '1', 'addUserForTeam' => Team::CREATE_NEW_USER, @@ -57,9 +57,9 @@ class TeamControllerTest extends JuryControllerTestCase ['name' => 'no_members', 'publicdescription' => '', 'displayName' => 'Team without members'], - ['name' => 'no_room', - 'room' => '', - 'displayName' => 'Team without a room'], + ['name' => 'no_location', + 'location' => '', + 'displayName' => 'Team without a location'], ['name' => 'no_comments', 'internalcomments' => '', 'displayName' => 'Team without comments'], diff --git a/webapp/tests/Unit/Service/ImportExportServiceTest.php b/webapp/tests/Unit/Service/ImportExportServiceTest.php index eb95cbd88c..550e5c5a4c 100644 --- a/webapp/tests/Unit/Service/ImportExportServiceTest.php +++ b/webapp/tests/Unit/Service/ImportExportServiceTest.php @@ -675,7 +675,7 @@ public function testImportTeamsTsv(): void self::assertEquals($data['icpcid'], $team->getIcpcId()); self::assertEquals($data['label'], $team->getLabel()); self::assertEquals($data['name'], $team->getName()); - self::assertNull($team->getRoom()); + self::assertNull($team->getLocation()); self::assertEquals($data['category']['externalid'], $team->getCategory()->getExternalid()); self::assertEquals($data['affiliation']['externalid'], $team->getAffiliation()->getExternalid()); self::assertEquals($data['affiliation']['shortname'], $team->getAffiliation()->getShortname()); @@ -697,7 +697,7 @@ public function testImportTeamsJson(): void "group_ids": ["24"], "name": "¡i¡i¡", "organization_id": "INST-42", - "room": "AUD 10" + "location": "AUD 10" }, { "id": "12", "icpc_id": "447837", @@ -720,7 +720,7 @@ public function testImportTeamsJson(): void 'icpcid' => '447047', 'label' => 'team1', 'name' => '¡i¡i¡', - 'room' => 'AUD 10', + 'location' => 'AUD 10', 'category' => [ 'externalid' => '24', ], @@ -732,7 +732,7 @@ public function testImportTeamsJson(): void 'icpcid' => '447837', 'label' => null, 'name' => 'Pleading not FAUlty', - 'room' => null, + 'location' => null, 'category' => [ 'externalid' => '25', ], @@ -744,7 +744,7 @@ public function testImportTeamsJson(): void 'icpcid' => '123456', 'label' => '0', 'name' => 'Team with label 0', - 'room' => null, + 'location' => null, 'category' => [ 'externalid' => '26', ], @@ -774,7 +774,7 @@ public function testImportTeamsJson(): void self::assertNotNull($team, "Team $data[name] does not exist"); self::assertEquals($data['icpcid'], $team->getIcpcId()); self::assertEquals($data['label'], $team->getLabel()); - self::assertEquals($data['room'], $team->getRoom()); + self::assertEquals($data['location'], $team->getLocation()); self::assertEquals($data['name'], $team->getName()); self::assertEquals($data['category']['externalid'], $team->getCategory()->getExternalid()); self::assertEquals($data['affiliation']['externalid'], $team->getAffiliation()->getExternalid()); From e8ebbf291452c295ac1842619d94eb85d08827b8 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Tue, 16 Jan 2024 15:46:04 +0100 Subject: [PATCH 2/2] Use location.description for location to be spec compliant. --- doc/manual/import.rst | 4 ++-- webapp/src/Entity/Team.php | 11 ++++++++++- webapp/src/Helpers/TeamLocation.php | 10 ++++++++++ webapp/src/Service/ImportExportService.php | 2 +- .../tests/Unit/Controller/API/TeamControllerTest.php | 2 +- webapp/tests/Unit/Service/ImportExportServiceTest.php | 2 +- 6 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 webapp/src/Helpers/TeamLocation.php diff --git a/doc/manual/import.rst b/doc/manual/import.rst index 11878e11db..2b685943b4 100644 --- a/doc/manual/import.rst +++ b/doc/manual/import.rst @@ -166,7 +166,7 @@ fields: - ``display_name`` (optional): the team display name. If provided, will display this instead of the team name in certain places, like the scoreboard - ``organization_id``: the ID of the team affiliation this team belongs to -- ``location`` (optional): the location of the team +- ``location.description`` (optional): the location of the team If the ``data_source`` setting of DOMjudge is set to external, the ``id`` field will be the ID used for the team and the ``group_ids`` and ``organization_id`` fields are the values as @@ -183,7 +183,7 @@ Example ``teams.json``:: "group_ids": ["24"], "name": "¡i¡i¡", "organization_id": "INST-42", - "location": "AUD 10" + "location": {"description": "AUD 10"} }, { "id": "2", "icpc_id": "447837", diff --git a/webapp/src/Entity/Team.php b/webapp/src/Entity/Team.php index 73c749f47e..1de127be10 100644 --- a/webapp/src/Entity/Team.php +++ b/webapp/src/Entity/Team.php @@ -3,6 +3,7 @@ namespace App\Entity; use App\Controller\API\AbstractRestController as ARC; +use App\Helpers\TeamLocation; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; @@ -88,7 +89,7 @@ class Team extends BaseApiEntity implements ExternalRelationshipEntityInterface, #[ORM\Column(nullable: true, options: ['comment' => 'Physical location of team'])] #[OA\Property(nullable: true)] - #[Serializer\Groups([ARC::GROUP_NONSTRICT])] + #[Serializer\Exclude] private ?string $location = null; #[ORM\Column( @@ -297,6 +298,14 @@ public function getLocation(): ?string return $this->location; } + #[Serializer\Groups([ARC::GROUP_NONSTRICT])] + #[Serializer\VirtualProperty] + #[Serializer\SerializedName('location')] + public function getLocationForApi(): ?TeamLocation + { + return $this->location ? new TeamLocation($this->location) : null; + } + public function setInternalComments(?string $comments): Team { $this->internalComments = $comments; diff --git a/webapp/src/Helpers/TeamLocation.php b/webapp/src/Helpers/TeamLocation.php new file mode 100644 index 0000000000..ee0120ec96 --- /dev/null +++ b/webapp/src/Helpers/TeamLocation.php @@ -0,0 +1,10 @@ + @$team['name'], 'display_name' => @$team['display_name'], 'publicdescription' => $team['public_description'] ?? @$team['members'], - 'location' => @$team['location'], + 'location' => @$team['location']['description'], ], 'team_affiliation' => [ 'externalid' => $team['organization_id'] ?? null, diff --git a/webapp/tests/Unit/Controller/API/TeamControllerTest.php b/webapp/tests/Unit/Controller/API/TeamControllerTest.php index f172607e99..c84171f6cb 100644 --- a/webapp/tests/Unit/Controller/API/TeamControllerTest.php +++ b/webapp/tests/Unit/Controller/API/TeamControllerTest.php @@ -22,7 +22,7 @@ class TeamControllerTest extends BaseTestCase 'display_name' => null, 'members' => null, 'photo' => null, - 'location' => 'Utrecht', + 'location' => ['description' => 'Utrecht'], ], ]; diff --git a/webapp/tests/Unit/Service/ImportExportServiceTest.php b/webapp/tests/Unit/Service/ImportExportServiceTest.php index 550e5c5a4c..1794fa5f02 100644 --- a/webapp/tests/Unit/Service/ImportExportServiceTest.php +++ b/webapp/tests/Unit/Service/ImportExportServiceTest.php @@ -697,7 +697,7 @@ public function testImportTeamsJson(): void "group_ids": ["24"], "name": "¡i¡i¡", "organization_id": "INST-42", - "location": "AUD 10" + "location": {"description": "AUD 10"} }, { "id": "12", "icpc_id": "447837",