Skip to content

Add StatusUpdateTime support for unit and assignment models - #48

Open
porcej wants to merge 1 commit into
mainfrom
47-add-support-for-unit-models-with-statusupdatetime
Open

porcej wants to merge 1 commit into
mainfrom
47-add-support-for-unit-models-with-statusupdatetime

Conversation

@porcej

@porcej porcej commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bump Dashboard.Models submodule to include StatusUpdateTime on UnitDto and UnitAssignmentDto
  • Propagate StatusUpdateTime between global units and incident assignments in CAD
  • Stamp DateTime.UtcNow in UpdateUnitStatus so the status-id-only SignalR path still populates the field

Closes #47

Test plan

  • Confirm submodule initializes to commit with StatusUpdateTime on both DTOs
  • Build project successfully after submodule update
  • Send IncidentUnitStatusChanged with a UnitAssignmentDto that includes StatusUpdateTime and verify it is stored on both the assignment and the matching global unit
  • Call UnitStatusChanged(radioName, statusId) and verify the unit’s StatusUpdateTime is set
  • Merge into updated main (post-45 add support for native docker deploymnet #46) and confirm no conflicts

Made with Cursor

Bump Dashboard.Models and propagate StatusUpdateTime through CAD status updates.
@porcej porcej linked an issue Jul 22, 2026 that may be closed by this pull request

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 121fb4d. Configure here.

Comment thread CAD.cs
UnitDto globalUnit = GetUnitByName(unit.RadioName);
globalUnit.StatusId = unit.StatusId;
globalUnit.StatusCode = unit.StatusCode;
globalUnit.StatusUpdateTime = unit.StatusUpdateTime;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default timestamp clears global unit

Medium Severity

In AddOrUpdateIncidentUnit, assigning globalUnit.StatusUpdateTime from the incoming UnitAssignmentDto always runs, so a payload without StatusUpdateTime (default DateTime) overwrites a timestamp previously set on the global unit—for example via UpdateUnitStatus—with an invalid default value.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 121fb4d. Configure here.

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.

Add Support for Unit Models with StatusUpdateTime

1 participant