Meldung von Sven (DTFB-IT): "Ist irgendwo zwischendurch ein 5:5 werden alle
Ergebnisse und Paarungen beim Speichern ab dort geloescht." Seine Vermutung
traf zu: teamspiel_*_punkte zaehlt nur ENTSCHIEDENE Saetze, und punkte == 0:0
gilt an mehreren Stellen als "nichts eingetragen". Wo Unentschieden normal
sind (Je-Satz-Modus, Satzergebnis-Erfassung), kollidiert das.
Gemessen an PRUEF Liga G (Modus 21, je Satz): eingetragen Spiel 1
"6:4 5:5 2:6 6:3", Spiel 2 "5:5 5:5", Spiel 3 "4:4 6:2 5:5 2:6" -- gespeichert
wurde nur Spiel 1. Spiel 2 ergibt Punkte 0:0, damit war die Behalte-Bedingung
(admin.php) und die do-while-Bedingung falsch, die Schleife endete, und
DELETE ... WHERE teamspiel_nummer >= $spiel_nr nahm Spiel 2 UND Spiel 3 mit.
Die falschen Gesamttore aus der Meldung sind eine Folge derselben Loeschung;
ohne komplett unentschiedenes Spiel stimmen sie exakt (47:42 = Handrechnung).
Ausserdem gemessen: eine Begegnung, deren Spiele ALLE unentschieden enden
(Begegnungspunkte 0:0), verschwand komplett aus der Tabelle -- die Mannschaft
zeigte danach "0 Siege, 0 Unentschieden, 1 Niederlage", Spielpunkte und Tore
der Begegnung fehlten. Grund: die Tabellenabfragen filtern Begegnungen mit
(heim_punkte != 0 OR gast_punkte != 0).
Behebung: ueberall dort, wo punkte != 0 als "es liegt ein Ergebnis vor"
dient, gilt zusaetzlich "ein Satzergebnis liegt vor" -- das Kriterium wird
erweitert, nie verengt:
- Speicherschleife adminSaveBegegnungSpielplan(): Behalte-Bedingung und
do-while zusaetzlich !empty($ergebnis_detailliert). Auf teamspiel-Ebene ist
ergebnis_detailliert das unmittelbare Zeugnis der Eingabe; es ist genau dann
gefuellt, wenn Satzergebnisse eingetragen wurden.
- Wiederherstellungs-Block fuer Zwischenergebnisse: Punkte werden nur noch
zurueckgeholt, wenn NEBEN 0:0 auch kein Satzergebnis gesendet wurde -- ein
live eingetragenes "5:5 5:5" ist eine Eingabe, keine Luecke.
- Tabellenabfragen (getTabelleSpieltag, teamstatistikAktualisieren samt
Buchholz-Paarungen): ausgetragen ist eine Begegnung mit punkte != 0 ODER
heim_tore IS NOT NULL. Auf Begegnungsebene gibt es kein ergebnis_detailliert;
heim_tore (Datenbankversion 123) wird beim Speichern genau dann gesetzt, wenn
Satzergebnisse vorliegen, und ist damit dort das eindeutige Signal.
- Spieltag-Ermittlung (tabelle(), teamstatistikAktualisieren): ein Spieltag
mit heim_spielpunkte 0:0 (Wertung "je Satz, Sieg 1": alle Spiele remis)
zaehlt ueber NOT ISNULL(heim_tore) trotzdem als ausgetragen.
Bestandsmodi aendern sich nicht: ausserhalb der Satzergebnis-Erfassung ist
bei "nicht eingetragen" auch kein Satzergebnis vorhanden (ergebnis_detailliert
leer, heim_tore NULL), das erweiterte Kriterium bleibt dort wirkungslos. Die
SQL-Zusaetze sind an $je_satz gebunden bzw. haengen an Spalten, die in
Bestandsdaten NULL sind; die von getTabelleSpieltag erzeugten Abfragen bleiben
fuer Nicht-Je-Satz-Modi byteidentisch (Query-Log-Vergleich wie bei 49ce079).
SportsManager
DEV/STAGE environments
| LV | HOSTER | DOMAIN | BRANCH |
|---|---|---|---|
| DTFB | Kicktemp | stage.dtfb.de | dev |
| TFVHH | Kicktemp | stage.kickern-hamburg.de | dev |
| STFVH | DTFB | stage.stfv.de | sportsmanager2-stage |
| MTFV | DTFB | stage.mtfv.de | ? |
| TFVSH | DTFB | relaunch.tfvsh.de | ? |
PROD environments
| LV | HOSTER | DOMAIN | BRANCH |
|---|---|---|---|
| DTFB | Kicktemp | dtfb.de | production |
| TFVHH | Kicktemp | kickern-hamburg.de | production |
| MTFV | DTFB | mtfv.de | sportsmanager2-prod |
| TFVSH | DTFB | tfvsh.de | sportsmanager2-prod |
| STFVH | DTFB | stfv.de | sportsmanager2-prod |
Test setup
Installation
To start joomla and the database, run
docker-compose up -d
Release creation
To create a release execute
npm run release
Deployment
Deployment can only be done manually right now (sad)
To do this go to
Testserver Extension Installer Site
and upload the zip file found in ./package/packages
Development Tools
If you are using Intellij, there is a plugin named Joomla! which helps with resolving
joomla specific database prefixes like #__
To set it up, insert into the configuration popup which follows after you enable the framework support:
Joomla install path: ./data/joomla_data
JConfig: ./data/joomla_data/configuration.php
This works only with mounted volumes. However, mounted volumes will slow down the joomla instance significantly.
The current setup does not use mounted volumes. An alternative would be to download joomla and use that installation
Debugging (with Docker/Intellij)
-
Start Docker Container (see above)
-
Create a terminal for that container
docker exec -it <container_name> bash -
install xdebug within the container since joomla does not come with xdebug preinstalled
pecl install xdebug -
restart the container
-
In Intellij Go to File | Settings | Languages & Frameworks | PHP | Servers and setup your server
name anything host localhost port 8080 debugger xdebug use the path mapping and map the repo structure to the container content
File/Directory path on server <path>/com_sportsmanager/src/structure/administrator/components /var/www/html/administrator/components <path>/com_sportsmanager/src/structure/components /var/www/html/components -
Click on "Start Listening for PHP Debug Connections" in the top row of intellij
-
(Not sure if optional) Install a browser extension by Jetbrains
https://chromewebstore.google.com/detail/xdebug-helper-by-jetbrain/aoelhdemabeimdhedkidlnbkfhnhgnhm
How to release
Hint: for technical details regarding the release process have a look into .github/...
To create a release these steps need to be followed
- make sure all needed code changes are merged from dev -> stage -> prod, since releases may only be build on prod branch
- give pull requests meaningful names and label them enhancement/bug/chore since labels and names are used for release note generation Hint: if a specific pull request should be ignored, add the label changelog-ignore
- tag a commit (recommended is the latest merge on prod). The pipeline is listening for any tag fitting
v[0-9]+.[0-9]+.[0-9]+git tag -a v1.2.3 1a2b3c4 -m "Release version 1.2.3" - push the tag
git push origin --tags - the tag push will trigger the pipeline, and it will create the release and store in GitHub
A release can be created again anytime by deleting the release from GitHub, deleting the tag (from GitHub and additionally from git) and repeating step 3 and 4
Further: merges from dev to stage and from stage to prod can only be done by creating pull requests. These pull requests will be automatically labeled as changelog-ignore