Feature/epic 6#658
Conversation
+ ungewünschte änderung für #1925 rückgängig
…ackend into feature/epic-6
…hafts-Aenderungen sperren Ergaenzung zu swt2#2157 (Frontend-Sperre). Bei Phase 'Laufend' werfen create, assignMannschaftToVeranstaltung, unassignMannschaftFromVeranstaltung sowie MannschaftSortierung.update jetzt eine BusinessException (ENTITY_CONFLICT_ERROR), sodass die Regel nicht per direktem API-Call umgangen werden kann. Inkl. Backend-Tests (laufend -> abgelehnt, geplant -> erlaubt). Ticket swt2#2229.
…iehen (Review swt2#2229) VeranstaltungComponent.isVeranstaltungLaufend(long) neu: vergleicht den numerischen Phasenwert (robuster als das String-Label), null-safe. Die Services nutzen den zentralen Check; duplizierte 'Laufend'-Konstante und Pruef-Logik entfernt. Tests fuer den Component-Check ergaenzt; Service-Tests umgestellt.
…ew swt2#2229) isVeranstaltungLaufend zusaetzlich als DO-Variante; die laufend-Entscheidung liegt zentral in einer privaten isPhaseLaufend(Integer)-Methode, beide Einstiege (id/DO) fuehren darauf zurueck (keine Divergenz). assignMannschaftToVeranstaltung laedt die Veranstaltung nur noch einmal und prueft die Phase auf dem geladenen DO.
…tung (Review swt2#2229) Sichert ab, dass bei veranstaltungId == null die Phasenpruefung uebersprungen wird und updateSortierung ausgefuehrt wird (kein NPE, kein faelschliches Blockieren).
…atches and strafpunkte
… und erlaube Sportleitern Delete für eigenen Verein - tests - delete method hat more permissions - delete method changed - ErrorCode
Beim Anlegen/Zuordnen einer Mannschaft in eine bereits volle Veranstaltung warf das Backend einen generischen INVALID_ARGUMENT_ERROR mit rohem englischen Text ("...maximum capacity"), der im Frontend ungefiltert angezeigt wurde.
Stattdessen wird jetzt ein spezifischer BusinessException mit neuem ErrorCode VERANSTALTUNG_MAX_CAPACITY_ERROR und verstaendlicher deutscher Meldung geworfen (an beiden Pruefstellen: create und Zuordnung/Update). Das Frontend kann die Meldung damit gezielt anzeigen.
…Marker auf Match-ID umgestellt Das Feld mannschaftsmitglied_dsb_mitglied_eingesetzt wurde doppelt genutzt: als Kader-Flag (>=1 = in der Schuetzenmeldung waehlbar) und als Gemeldet-Marker (== Match-Nr). Bei Match Nr. 1 kollidierte der Marker mit dem Flag: bei Mannschaften mit mehr als 3 Kadermitgliedern galten alle als gemeldet, das Backend lieferte >3 schuetzeStammDaten und das Frontend brach die Passe-Eingabe ab. Fix: eingesetzt traegt jetzt die eindeutige Match-ID statt der Match-Nr (Schuetzenmeldung.markShootersAsDeployed/getDeployedMembersForCurrentMatch, Satzeingabe.getRegisteredShootersForCurrentMatch/validateShooterRegistration). Der Pool-Filter eingesetzt >= 1 bleibt gueltig, da Match-IDs >= 1 sind. Tests angepasst plus Regressionstests fuer das Ticket-Szenario.
… für Sportleiter
- Backend: Deadline-Check in DownloadService für alle 4 PDF-Endpunkte
(rueckennummer, rueckennummern, schuetzenlizenz, lizenzen)
- Backend: Neuer ErrorCode PDF_DOWNLOAD_BEFORE_MELDEDEADLINE
- Backend: VeranstaltungComponent in DownloadService injiziert
- Frontend: isDownloadBlocked() + Notification in mannschaft-detail
- Frontend: i18n-Keys für Fehlermeldung (de/en)
- Tests: 12 neue Unit-Tests für alle Deadline-Szenarien
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15e70a7307
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,9 @@ | |||
| -- Test matches for wettkampf_id=2020 to enable Schusszettel PDF download without Generiere-Matches | |||
There was a problem hiding this comment.
Give the LOCAL migration a unique version
When running with the default/LOCAL Flyway locations (db/migration/all,db/migration/LOCAL), this new V32_0 migration has the same version as the existing all/V32_0__add_permission_alter_sportleiter_role.sql, so Flyway will detect two version 32.0 migrations and abort local startup/migration before any tests can run. Renumber this LOCAL script to an unused version or make it repeatable/test-only outside the Flyway version chain.
Useful? React with 👍 / 👎.
| @@ -1,80 +0,0 @@ | |||
| -- Migration to fix next match id calculation in ligamatch view | |||
There was a problem hiding this comment.
Keep applied Flyway migrations in the classpath
Deleting a versioned migration from db/migration/all breaks any database that has already applied version 39.0: on the next deploy Flyway sees the schema-history entry but cannot resolve the script locally, so migration validation/startup fails. If the view change is no longer desired, keep this file stable and add a new migration to change it forward instead of removing the old version.
Useful? React with 👍 / 👎.
|
|
||
| LOG.debug("Receive 'findAnzeigenMatchByPhysischeBildschirmId' request with id '{}'", id); | ||
|
|
||
| return new AnzeigenMatchDTO(); |
There was a problem hiding this comment.
Populate the Anzeigen match response
For every physical display id, this new endpoint currently returns a fresh default DTO, so clients always receive match 0, empty club names, null shot arrays, and zero totals even when an anzeigen row and current match exist. The handler needs to look up the display by physischeBildschirmId and build the DTO from the referenced match instead of returning placeholder data.
Useful? React with 👍 / 👎.
| path = "pdf/schuetzenlizenz/{dsbMitgliedId}/{teamId}", | ||
| produces = MediaType.APPLICATION_PDF_VALUE) | ||
| @RequiresPermission(UserPermission.CAN_READ_WETTKAMPF) | ||
| @RequiresOnePermissions(perm = {UserPermission.CAN_MODIFY_MY_VEREIN, UserPermission.CAN_MODIFY_MY_VERANSTALTUNG}) |
There was a problem hiding this comment.
Allow admins through the license download gate
The seeded ADMIN role has the general read/modify permissions but not CAN_MODIFY_MY_VEREIN or CAN_MODIFY_MY_VERANSTALTUNG, so this annotation rejects admins before they reach the deadline bypass/data checks; the same restriction is applied to the team-license endpoint below. This regresses admin access that previously worked via CAN_READ_WETTKAMPF/CAN_READ_DEFAULT, so include an admin/general permission in the gate or handle admins explicitly.
Useful? React with 👍 / 👎.
| return generatePhysischeBildschirmId(); | ||
| } | ||
| return id; | ||
| return UUID.randomUUID().toString().substring(0, 4); |
There was a problem hiding this comment.
Check for collisions when issuing display IDs
This now returns only the first four hex characters of a UUID and no longer retries when the generated id already exists, while physische_bildschirm_id still has a unique constraint. After enough displays are created a collision will either hand a user an id for another display or make the later save fail; keep the existing uniqueness check/retry, especially because the new alphabet is only 16^4 values.
Useful? React with 👍 / 👎.



No description provided.