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

[candidate_parameters] Allow clearing of consent status #7772

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

CamilleBeau
Copy link
Contributor

Brief summary of changes

This PR allows users to set a consent status back to null. I chose not to do this with a "Clear" button because a clear button would mean you are clearing all or none of the consent statuses on the page, or otherwise we would need a clear button for each individual consent. Instead, the participant can set the status to be empty and update the consent as usual. The date and withdrawal date are cleared and disabled when the status is set back to empty.

Testing instructions (if applicable)

  1. Check that you are successfully able to update a consent status from non-null to empty
  2. Check that when you update the status to empty, it only updates empty values for that consent and not for any other consent that was already empty
  3. Make sure that the consent status history is updated appropriately
  4. Check that all of the validation for consent still persists:
  • The status should be required if a date is entered
  • a date should be required if the status is entered
  • a withdrawal date should be required if the consent status is changed from yes to no only

Link(s) to related issue(s)

@maltheism
Copy link
Member

maltheism commented Oct 17, 2022

Hi @CamilleBeau the consent fields revert back to the previous values after clicking the "Update" button.
Example:

then selecting empty field for response:

then after clicking the Update button:

I might be mistaken but I don't think that's intended?

@maltheism maltheism added the State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) label Oct 17, 2022
@CamilleBeau CamilleBeau force-pushed the 2021_11_03_Consent_Clear branch from d780051 to 70b558f Compare November 30, 2022 21:03
@CamilleBeau CamilleBeau removed the State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) label Nov 30, 2022
@CamilleBeau
Copy link
Contributor Author

@maltheism Rebased!

I tested this again on my VM and I was not able to replicate the problem you mentioned:

First values:
image

Clearing value & pressing submit:
image

It stayed clear after refreshing as well. Would you be able to re-test it now that I've rebased?

@CamilleBeau
Copy link
Contributor Author

Does anyone have insight on the test suite failures here?

@cmadjar
Copy link
Collaborator

cmadjar commented Dec 6, 2022

@kongtiaowang can you help @CamilleBeau resolves the test failures please? Thanks!

@kongtiaowang kongtiaowang reopened this Feb 7, 2023
@laemtl laemtl added this to the 25.0.0 milestone Feb 28, 2023
@laemtl laemtl requested a review from zaliqarosli March 14, 2023 15:53
Copy link
Contributor

@sruthymathew123 sruthymathew123 left a comment

Choose a reason for hiding this comment

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

Tested and looks good

@sruthymathew123 sruthymathew123 added the Passed manual tests PR has been successfully tested by at least one peer label Mar 14, 2023
@driusan driusan merged commit 1a6c006 into aces:main Mar 14, 2023
driusan pushed a commit that referenced this pull request Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed manual tests PR has been successfully tested by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ConsentStatus] Add explicit button/action to clear consent
8 participants