Skip to content
New issue

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

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

Already on GitHub? # to your account

[Consent] Validate DateWithdrawn later than DateGiven #6102

Closed
zaliqarosli opened this issue Feb 25, 2020 · 0 comments · Fixed by #8298
Closed

[Consent] Validate DateWithdrawn later than DateGiven #6102

zaliqarosli opened this issue Feb 25, 2020 · 0 comments · Fixed by #8298
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)

Comments

@zaliqarosli
Copy link
Contributor

zaliqarosli commented Feb 25, 2020

Describe the bug
This is not necessarily a bug, but a request to strengthen the validation of the candidate_consent_rel data. Currently, a user is able to withdraw consent with a date that is earlier than the date of given consent. Theoretically, the date of withdrawal should always be later than the date of given consent.

To Reproduce

  1. Go to candidate_parameters module
  2. Click on Consent tab
  3. Update a consent to 'Yes', provide today's date, and Save. Then, withdraw the consent by changing the response to 'No', and provide yesterday's date as the Date of Withdrawal. Save changes.
  4. You will see that no error is thrown.

What did you expect to happen?
The front-end AND back-end should validate that if consent is being withdrawn, then the Date of Withdrawal being submitted is later than the Date of Consent currently in the database.

Lack of validation first reported here #6044

@zaliqarosli zaliqarosli added the Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) label Feb 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant