feat(events): user-overridable DoneAtUserModifiable on CompleteEvent#817
Merged
Conversation
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>
There was a problem hiding this comment.
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
CompleteEventRequestwith optionaldone_at_user_modifiable(yyyy-MM-dd) in the gRPC contract. - Updates
EventsGrpcService.CompleteEventto computeuserModifiableby combining the overridden DATE (if provided/parseable) with the existing wall-clock TIME, and persists it toCase.DoneAtUserModifiable. - Updates the “re-affirm” safety-net logic to compare/repair
DoneAtUserModifiableagainstuserModifiableinstead ofdayDoneAt.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CompleteEventRequest.done_at_user_modifiable(yyyy-MM-dd ISO date).EventsGrpcService.CompleteEvent) combines the override DATE with the wall-clock TIME and writes the result toCase.DoneAtUserModifiable.Case.DoneAtis unchanged — still deadline-date + wall-time, which is load-bearing for the angular "filled cases" admin view (rationale atEventsGrpcService.cs:1195-1216).DoneAtUserModifiableagainstuserModifiablerather thandayDoneAt, so user overrides survive it.Test plan
Cases.DoneAtUserModifiablecolumndone_at_user_modifiable) still producesDoneAtUserModifiable == dayDoneAtDoneAtUserModifiable == picked-date @ wall-timewhileDoneAt == deadline-date @ wall-time🤖 Generated with Claude Code