Repository navigation
fix: show the Compliance version the app reports without a case event - #1490
Merged
Merged
Conversation
The Compliance column of the workers list reads Units.eFormVersion, which the SDK only wrote when a case was retrieved or completed. After a worker updated the app and synced, the list kept showing the old version and flagged it as needing an update. IndexDeviceUser now calls Core.Advanced_UnitsRefreshFromRemote (new in Microting.eForm 10.0.44) before reading the units, so the version Microting has from the latest sync is shown. A failing refresh is logged and the list is shown from the stored units as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The refresh can expose credentials, delay requests, overwrite newer snapshots, and risk incompatibility with the current host SDK, while repeated full refreshes add unnecessary load.
5 open issues
What changed in this PR
Updates the backend worker list to refresh Compliance app versions from Microting, so app updates can appear without waiting for a case event.
Changes:
- Upgrades
Microting.eFormto 10.0.44 for the remote unit-refresh API. - Refreshes units before reading worker app details, logging failures and falling back to stored data.
- Adds a regression test for a remotely reported version newer than the stored version.
| File | Description |
|---|---|
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationAssignmentWorkerService/BackendConfigurationAssignmentWorkerService.cs |
Adds remote unit refresh before worker-list reads. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/BackendConfiguration.Pn.csproj |
Updates the SDK dependency to 10.0.44. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/PropertyWorkersAppVersionsTests.cs |
Tests version freshness and update status without a case event. |
Review effort: Balanced
IndexDeviceUser fetched every unit from Microting on each request, including searches, sorting and the worker pickers that share the endpoint, and an outage at Microting could hold the list for as long as the SDK retries. The refresh now runs only when the request sets RefreshAppVersions, which the workers page does on its first list request after it loads. The list waits at most 5 seconds; a slower refresh finishes in the background and the stored versions are shown meanwhile. Concurrent page loads share one refresh, and one still running after 20 minutes is replaced. The regression test passes the flag; a new test checks that without it the stored version is shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Take the package versions from stable (Microting.eForm 10.0.47, which provides Advanced_UnitsRefreshFromRemote). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r ones - The properties service takes the host DeviceUserRequestModel, which has no refreshAppVersions; widen its parameter so the client compiles, and drop the unused field from the plugin model copy. - Cancel the previous table load before starting a new one, and send the refresh flag until one load has completed. - Share a running units refresh until it completes instead of starting a second one after 20 minutes, so two refreshes never write units at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Regression coverage is missing for refresh timeouts, failure fallback, and shared in-flight requests, leaving the five-second stored-version fallback and single-refresh behavior unverified.
2 open issues
2 resolved since last review
Review effort: Balanced
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.



Problem
The Compliance column of the workers list (
IndexDeviceUser) readsUnits.eFormVersion. The SDK only wrote that column when a case was retrieved or completed, so after a worker updated the eForm app and synced, the list kept showing the old version and flagged it as needing an update.Fix
Microting.eFormto 10.0.44, which addsCore.Advanced_UnitsRefreshFromRemote()(feat: refresh unit app versions from Microting without a case event eform-sdk-dotnet#4984): one request to Microting for all units, writing only units whose version/device details changed.IndexDeviceUsercalls it before reading the units. If the refresh fails, it is logged as a warning and the list is shown from the stored units as before.Together with the flutter-eform change (the app now sends its installed version on every sync after an update), the new version shows on the workers list right after the worker pulls to refresh.
Regression test
PropertyWorkersAppVersionsTests.IndexDeviceUser_ShowsTheComplianceVersionMicrotingReports_WithoutACaseEvent: the unit is stored on 3.2.1 while the (fake) Microting server reports the latest Compliance version (HttpFake.ReportedUnits); the index must show the latest version and not flag it. Without the refresh the stored 3.2.1 is shown and flagged. The existing tests are unaffected: the SDK fake reports units as stored unless a test overrides them.Testing
Built locally (
dotnet build); the integration tests run in CI.Kanban card #5482
🤖 Generated with Claude Code