Skip to content

feat(events): user-overridable DoneAtUserModifiable on CompleteEvent#817

Merged
renemadsen merged 2 commits into
stablefrom
feat/event-done-at-user-modifiable
May 15, 2026
Merged

feat(events): user-overridable DoneAtUserModifiable on CompleteEvent#817
renemadsen merged 2 commits into
stablefrom
feat/event-done-at-user-modifiable

Conversation

@renemadsen
Copy link
Copy Markdown
Member

Summary

  • Adds optional CompleteEventRequest.done_at_user_modifiable (yyyy-MM-dd ISO date).
  • Server (EventsGrpcService.CompleteEvent) combines the override DATE with the wall-clock TIME and writes the result to Case.DoneAtUserModifiable.
  • Case.DoneAt is unchanged — still deadline-date + wall-time, which is load-bearing for the angular "filled cases" admin view (rationale at EventsGrpcService.cs:1195-1216).
  • The downstream re-affirm safety-net now compares and rewrites DoneAtUserModifiable against userModifiable rather than dayDoneAt, so user overrides survive it.
  • Empty / unparseable input falls back to current behavior (backwards-compatible with mobile clients pre-dating this change).

Test plan

  • Backend builds and starts cleanly with the new plugin (verified locally)
  • Mobile client diff (separate flutter-eform PR) sends the new field and the value is observed on the SDK Cases.DoneAtUserModifiable column
  • Default path (empty done_at_user_modifiable) still produces DoneAtUserModifiable == dayDoneAt
  • Override path produces DoneAtUserModifiable == picked-date @ wall-time while DoneAt == deadline-date @ wall-time
  • Angular case editor's "Submitted date" reflects the override

🤖 Generated with Claude Code

Adds optional CompleteEventRequest.done_at_user_modifiable (yyyy-MM-dd).
When the client supplies it, the server combines it with the wall-clock
time-of-day and writes the result to Case.DoneAtUserModifiable. Case.DoneAt
stays deadline-dated (preserves the angular "filled cases" admin view
invariant documented at EventsGrpcService.cs:1195-1216). The downstream
re-affirm block now compares/rewrites DoneAtUserModifiable against
userModifiable (not dayDoneAt), so the override survives the safety net.

Empty / unparseable input falls back to current behavior, so old mobile
clients keep working.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 15, 2026 10:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a backward-compatible way for mobile clients to override the date portion of Case.DoneAtUserModifiable when completing an event via gRPC, while keeping Case.DoneAt anchored to the compliance deadline date (to preserve the existing Angular “filled cases” behavior).

Changes:

  • Extends CompleteEventRequest with optional done_at_user_modifiable (yyyy-MM-dd) in the gRPC contract.
  • Updates EventsGrpcService.CompleteEvent to compute userModifiable by combining the overridden DATE (if provided/parseable) with the existing wall-clock TIME, and persists it to Case.DoneAtUserModifiable.
  • Updates the “re-affirm” safety-net logic to compare/repair DoneAtUserModifiable against userModifiable instead of dayDoneAt.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/GrpcServices/EventsGrpcService.cs Computes/persists a user-overridable DoneAtUserModifiable while leaving DoneAt unchanged, and adjusts the re-affirm logic accordingly.
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Protos/events.proto Adds done_at_user_modifiable to CompleteEventRequest as an optional ISO date string.

Logs opgaveId, completed, complianceId, microtingSdkCaseId,
doneAtUserModifiable, and clientTsUnix on every CompleteEvent call.
Low-volume (worker-initiated unary RPC, not a stream path) so INFO
level is appropriate.

Earned its keep during on-device verification of the
DoneAtUserModifiable feature: distinguished a "wire field is empty"
hypothesis from a "wire field is set but server ignores it"
hypothesis in one tap, revealing the actual cause was a stale plugin
DLL on the dev host. Permanent operational diagnostic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@renemadsen renemadsen merged commit d2e6323 into stable May 15, 2026
17 checks passed
@renemadsen renemadsen deleted the feat/event-done-at-user-modifiable branch May 15, 2026 16:23
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.

2 participants