fix: show device identifier in grower detail when registration is empty - #1201
Open
marsof02 wants to merge 1 commit into
Open
fix: show device identifier in grower detail when registration is empty#1201marsof02 wants to merge 1 commit into
marsof02 wants to merge 1 commit into
Conversation
|
@dadiorchen , can you please review this PR |
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.
Description
Grower detail only loaded device identifiers from
planter-registration. For many growers (especially when registration rows are missing or lackdevice_identifier), the identifier still exists on captures (trees.deviceIdentifier), so the UI showed---even though the API had data.This PR:
device_identifier,deviceIdentifier, nestedfield_data/fieldData).Admin-only workaround — does not fix missing
device_identifieronplanter-registrationin field-data / bulk-pack ingestion (follow-up on backend).Issue(s) addressed
What kind of change(s) does this PR introduce?
Please check if the PR fulfils these requirements
Issue
What is the current behavior?
Grower detail shows device identifiers only from
GET .../planter-registration. If that list is empty or rows lackdevice_identifier, the Device Identifier section shows---, even when the grower’s captures includedeviceIdentifier(e.g. dev growers 22711, 22707). Switching between growers after viewing one with empty registrations could also leave device IDs stale.What is the new behavior?
Device identifiers are built from registrations when present; otherwise from recent captures. Opening a different grower reloads registration (and capture fallback when needed) correctly. OS label uses manufacturer when available, with shape-based inference for capture fallback.
Breaking change
Does this PR introduce a breaking change?
No.
Other useful information
Test plan (dev-k8s)
planter-registration, captures havedeviceIdentifier→ identifier visible in Grower detail.Follow-up (out of scope)
device_identifieronplanter-registration(bulk-pack / field-data pipeline).deviceIdentifier: nullwhen Device ID filter is empty.Manual testing on dev-k8s; no new unit tests added.