Skip to content

Resolves issue 1831, updates program_data.cve_website_update_date to behave as a date-only field.#1834

Merged
afoote-mitre merged 2 commits into
devfrom
dr_1831
Jun 3, 2026
Merged

Resolves issue 1831, updates program_data.cve_website_update_date to behave as a date-only field.#1834
afoote-mitre merged 2 commits into
devfrom
dr_1831

Conversation

@david-rocca

@david-rocca david-rocca commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Closes Issue #1831

Summary

This MR ensures program_data.cve_website_update_date is stored and returned without a time component. ISO date-time inputs are normalized to YYYY-MM-DD, while ambiguous month/day formats are rejected.

Important Changes

src/utils/dateOnly.js

  • Added strict date-only normalization and validation helpers.
  • Rejects ambiguous formats and invalid ISO dates.

src/model/baseorg.js

  • Changed cve_website_update_date from Date to validated date-only string storage.

src/repositories/baseOrgRepository.js

  • Normalizes the field before validation and on org response paths.

schemas/registry-org/*.json

  • Updated registry org schemas from date-time to date.

test/integration-tests/registry-org/registryOrgCRUDTest.js

  • Added coverage for date-only create/get behavior.
  • Added coverage for dropping time from ISO date-time input.
  • Added coverage for rejecting ambiguous dates.

Testing

  • bash -i -c "npm run test:integration" passed with 416 passing.
  • Create a registry org with program_data.cve_website_update_date: "2024-01-15" and verify the response returns "2024-01-15".
  • Update with "2024-04-10T18:30:00.000Z" and verify the response returns "2024-04-10".
  • Try "01/15/2024" and verify the API rejects it.

@david-rocca david-rocca changed the title Dr 1831 Resolves issue 1831, updates program_data.cve_website_update_date to behave as a date-only field. Jun 3, 2026
@afoote-mitre afoote-mitre merged commit 833844f into dev Jun 3, 2026
9 checks passed
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.

2 participants