Skip to content

feat DF-468: include form definition version in payload#198

Merged
whitewaterdesign merged 7 commits intomainfrom
feat/dd-468-definition-version
Sep 10, 2025
Merged

feat DF-468: include form definition version in payload#198
whitewaterdesign merged 7 commits intomainfrom
feat/dd-468-definition-version

Conversation

@mokhld
Copy link
Contributor

@mokhld mokhld commented Sep 8, 2025

Proposed change

Jira ticket:

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

@mokhld mokhld force-pushed the feat/dd-468-definition-version branch from 414833c to d14af6e Compare September 9, 2025 20:36
createdAt: new Date('2024-02-01T00:00:00.000Z')
}
]
} as unknown as FormMetadata
Copy link
Contributor

Choose a reason for hiding this comment

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

not too important, but stub builders are safer than setting as unknown as, then you can pass in only the properties that are important for the test.

isPreview: formStatus.isPreview,
notificationEmail: formMetadata?.notificationEmail ?? ''
notificationEmail: formMetadata?.notificationEmail ?? '',
...(versionMetadata && { versionMetadata })
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be pulled out above the const meta, as would be a bit cleaner than an inline destructure.

timestamp: now.toISOString(),
definition: model.def,
referenceNumber: context.referenceNumber
}
Copy link
Contributor

Choose a reason for hiding this comment

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

are we not passing version meta in the v2?

Copy link
Contributor Author

@mokhld mokhld Sep 10, 2025

Choose a reason for hiding this comment

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

It's not a requirement in this case. I think it wouldn't hurt to add it in, but would prefer a separate PR.

"versionMetadata": {
"version": 19,
"createdAt": "2025-09-08T09:28:15.576Z"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

is this documentation obsolete now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, this is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better to remove it.

Copy link
Contributor

@whitewaterdesign whitewaterdesign left a comment

Choose a reason for hiding this comment

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

Looks good, couple of minor comments, think when those are updated happy to approve.

@mokhld mokhld force-pushed the feat/dd-468-definition-version branch from 7772d2b to 1595722 Compare September 10, 2025 08:17
Copy link
Contributor

@whitewaterdesign whitewaterdesign left a comment

Choose a reason for hiding this comment

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

👍

@sonarqubecloud
Copy link

@whitewaterdesign whitewaterdesign merged commit 7bf61b9 into main Sep 10, 2025
10 checks passed
@whitewaterdesign whitewaterdesign deleted the feat/dd-468-definition-version branch September 10, 2025 11:42
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.

3 participants