Skip to content

Fix EOC unit update age for live GPS tracking - #72

Merged
ejosterberg merged 1 commit into
openises:mainfrom
ethanhawkes-gif:fix/eoc-unit-tracking-updated-71
Aug 17, 2026
Merged

Fix EOC unit update age for live GPS tracking#72
ejosterberg merged 1 commit into
openises:mainfrom
ethanhawkes-gif:fix/eoc-unit-tracking-updated-71

Conversation

@ethanhawkes-gif

Copy link
Copy Markdown
Contributor

Fixes #71.

The responder API already exposes last_track from the resolved tracking provider's received_at, and the EOC map consumes the resulting coordinates. The Units table's Updated cell only considered status_updated || updated, so a unit receiving fresh Traccar positions could still display the age of an old status change.

This change:

  • includes last_track in the EOC activity timestamp;
  • selects the newest parseable tracking, status, or unit-row timestamp rather than the first truthy value;
  • preserves the first nonblank value as a fallback for an unexpected timestamp format;
  • adds a focused regression guard.

Verification:

  • php -l situation.php
  • php tests/test_situation_map_fixes.php — 35 passed, 0 failed
  • git diff --check

No backend ingest or coordinate-selection behavior changes.

@ejosterberg
ejosterberg merged commit f3e079a into openises:main Aug 17, 2026
1 check passed
@ejosterberg

Copy link
Copy Markdown
Member

Thanks for the fix and for the clear repro path with cbyrdmo on #71 -- merged. I've also ported this into the private development tree (which is where releases are cut from) so it will be included in the next TicketsCAD release rather than only living on the public snapshot repo.

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.

[Bug]: Situation (EOC) Units location not updating

2 participants