feat(DF-922): read form version from definition metadata#340
Conversation
Use $$__formVersion from form definition metadata as the source of truth for version metadata in form context and adapter v1 payloads, with tests covering fallback precedence.
|
| ) | ||
| } | ||
|
|
||
| const versionNumber = getFormVersion(definition)?.versionNumber |
There was a problem hiding this comment.
Should the call to getFormVersion handle the fallback to old metadata, so it's all in one place?
jbarnsley10
left a comment
There was a problem hiding this comment.
Looks good. Just the one comment about the fallback being in the one getFormVersion method. I'll leave that up to you to decide. Approved anyway
|



Proposed change
Reads
$$__formVersionfrom the form definition metadata, injected by forms-manager, instead of metadata.versions for version tracking and falls back to metadata.versions in the adapter output for backward compatibility, until this is stable in prod then we can look to remove it.Jira ticket:
Type of change
Checklist
README.mdanddocs/*(where appropriate, e.g. new features).npm run test).npm run lint).npm run format).