Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update schemas to use boolean and date data types #75

Closed
mjtravers opened this issue May 11, 2022 · 2 comments
Closed

Update schemas to use boolean and date data types #75

mjtravers opened this issue May 11, 2022 · 2 comments
Assignees

Comments

@mjtravers
Copy link
Contributor

mjtravers commented May 11, 2022

Convert the old spec "X" and "YYYYMMDD" fields in the F3X, SchA, and transaction type schemas to boolean and string, format: date-time, respectively. The updates to the new validation definitions are more robust and future-proof to changes in the specs going forward.

Tech Notes

Fields to update in (1) validate schema, (2) Django model, and (3) Angular models

  • F3X.change_of_address (boolean)
  • F3X.date_of_election (date)
  • F3X.coverage_from_date (date)
  • F3X.coverage_through_date (date)
  • F3X.qualified_committee (boolean)
  • F3X.date_signed (date)
  • SchA.contribution_date (date)
  • SchA.memo_code (boolean)
  • OFFSET_TO_OPEX.contribution_date (date)
  • OFFSET_TO_OPEX.memo_code (boolean)

Here is the info on the date-time format for JSON schema

IMPORTANT: Validate that the javascript JSON.parse() and Django equivalent JSON parser convert the date type into the JSON schema date-time format (i.e. 2018-11-13T20:20:39+00:00)

Acceptance Criteria

  • Schema fields listed above in tech notes have been updated.
    F3X Schema
    Sched A Schema
    OFFSET_TO_OPEX schema
  • All unit tests and e2e tests pass

QA Notes

API unit tests
App unit tests
Validate unit tests

DEV Notes

null

Design

null

See full ticket and images here: FECFILE-103

@mjtravers
Copy link
Contributor Author

Technical note: Due to errors being thrown by the ajv validation library when loading the ajv-formats extension, the "format": "date" property has been replaced by "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$", which performs the same string check

@WiseQA
Copy link

WiseQA commented Jun 28, 2022

QA verified API unit test passed successfully as denoted in the QA Notes see below screenshot:

image.png

QA verified APP unit test passed successfully as denoted in the QA Notes see below screenshot:

image.png

QA verified Validate unit test passed successfully as denoted in the QA Notes see below screenshot:

image.png

QA review completed. Moved to Stage Ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants