Commit Graph
18 Commits
Author SHA1 Message Date
Tim 6b68d8a5ed Fix DB migration for sync_log: bump version to 121 and mirror into script.php
Addresses review feedback (jmeyer26):
- update.php: move the sync_log table + dtfb_sync_url setting out of the
  already-released <120 migration block into a new <121 block, so instances
  already at version 120 actually receive them.
- script.php: create the sync_log table, seed dtfb_sync_url, and set the
  fresh-install datenbank_version to 121 (parity with update.php).
2026-06-04 11:53:10 +02:00
Tim 5843fda2d6 QA: harden DTFB player sync receiver
Applies 6 fixes to sync.php found during QA of the player-sync feature:
1. Normalise non-UTF-8 (latin1/Win-1252) payloads -> fixes silent 0-row imports
2. Fail loudly (success=false) when N rows parse but nothing is added/updated
3. Remove dead \ block (undefined-variable notice)
4. Gate mass-deactivation: skip the sweep when a payload carries < 50% of an
   org's currently-active members (configurable via sync_deactivation_min_ratio,
   default 0.5); adds/updates still proceed, skipped sweeps return warnings
5. Use a single DB clock (NOW()) for staging session id/cleanup
6. Enforce Passnummer format ^[0-9]{2}-[0-9]{4,6}\$ (parity with manual import)

Adds tests/dtfb-player-sync/FINDINGS.md documenting the findings and fixes.
End-to-end validation is to be done on the staging environments.
2026-06-04 11:41:50 +02:00
Tim 511c17468c QA Edge Case Fixes: enforce spielernr and preserve DTFB fields
- Fix 1: Discard players missing spielernr instead of auto-generating them

- Fix 2: Preserve lizenznr, geburtsjahr, and pseudonym fields during player updates

- Fix 3: Resolve PHP 8 array offset warning by using !empty() for geschlecht parsing

- Fix 4: Leave clubless players handling as-is (skip them) per user request
2026-06-04 00:33:05 +02:00
Tim 6f33599fd9 Remove lizenz import handling - field should never be overwritten at DTFB 2026-06-04 00:09:31 +02:00
Tim aac4c1458f Merge sportsmanager2-dev and fix critical sync bugs
Merge resolution:
- Combined migration 120 (sync_log table + dev branch schema changes)

Bug fixes from intensive code review:
- C1: Fix session_id type mismatch - use datetime format matching
  the staging table schema instead of varchar string (was breaking
  the entire sync receive import)
- C2: Fix staging table cleanup query - use datetime comparison
  matching the original admin import pattern
- W1: Add set_time_limit(300) to prevent timeout during large imports
- W2: Add REDIRECT_HTTP_AUTHORIZATION header support for Apache
  mod_rewrite compatibility
- W4: Add lizenz column parsing and update during sync import
- M1: Tighten export WHERE clause to require both aktueller_verein_id
  and spielernr (consistent with original export behavior)
- M2: Wrap syncGetLastStatus() in try/catch for graceful handling
  when sync_log table doesn't exist yet
2026-06-04 00:02:56 +02:00
Tim f39ade0e9d Implement Player Sync to DTFB (#286) 2026-06-03 18:36:39 +02:00
Tim 7952c95217 Merge branch 'sportsmanager2-dev' into php-debugging 2025-06-24 18:58:07 +02:00
Tim 56679669c0 feat: extend tournament result upload window to 14 days for uploaders 2025-06-24 13:58:02 +00:00
Tim 1e8a7a3ae0 chore: add migration script for tournament reminder fields 2025-06-24 13:53:11 +00:00
Tim 269af499c8 feat: add auto-email reminder script for missing tournament results 2025-06-24 13:48:13 +00:00
Tim 0225e49beb Updated/added envs in README.md
Updated/added environments
2025-06-17 00:08:32 +02:00
Tim 2c3fef03fb Merge pull request #46 from Deutscher-Tischfussballbund/ranglisten-lizenz-dupli
lizenzen werden beim klonen mit geklont.
2024-11-15 12:56:40 +01:00
Tim 5c089a4325 Merge pull request #41 from Deutscher-Tischfussballbund/dev
Release Jan 2023
2023-01-16 15:19:27 +01:00
Tim 47c149cbe8 Merge pull request #40 from Deutscher-Tischfussballbund/production
Production changes back to dev
2023-01-16 15:13:41 +01:00
Tim 4ee2806d28 Merge pull request #35 from Deutscher-Tischfussballbund/revert-34-dev
Revert "caching to prod"
2022-07-30 21:25:33 +02:00
Tim 988f8f5ed6 Revert "caching to prod" 2022-07-30 21:25:12 +02:00
Tim 58f7bf727d Merge pull request #32 from Deutscher-Tischfussballbund/tecpromotion-update-prod-readme
Update README.md
2022-07-27 13:13:53 +02:00
Tim 6d88dc5469 Update README.md 2021-08-23 17:24:05 +02:00