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] Make Participant Status Reason properly required #9668

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CamilleBeau
Copy link
Contributor

Brief summary of changes

This PR makes the participant status reason field show up as enabled and required when a participant status is configured to have a reason required. This is done by casting the participant status index as a number before checking if it is in the required array. I also removed some unnecessary code in setFormData() that was making the field highlight red before anything was saved.

image
  • Have you updated related documentation?

Testing instructions (if applicable)

  1. Go to participant status
  2. Try selecting different participant status values and make sure that the reason field is only enabled / required when the participant status chosen has "Required" set to true in participant_status_options.
  3. Try saving when the participant status reason is not required, make sure it saves properly without a value entered
  4. Try saving when the participant status reason is required and nothing is entered. Make sure you get an error message
  5. Try saving when the participant status reason is required and an option is selected. Make sure that it saves successfully
  6. Check that the comment is only required for a participant status of "Active" or "Complete"

Link(s) to related issue(s)

@CamilleBeau CamilleBeau added the 27.0.0 - Bugs Bugs Found in LORIS 27 testing label Mar 5, 2025
@CamilleBeau CamilleBeau added this to the 27.0.0 milestone Mar 5, 2025
@CamilleBeau CamilleBeau force-pushed the 2025_03_05_participant_status_reason_required branch from e454282 to cc50a44 Compare March 5, 2025 16:03
Copy link
Contributor

@shonibare shonibare left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27.0.0 - Bugs Bugs Found in LORIS 27 testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[candidate_parameters] Confusing behaviour of the "Specify Reason" field in the "Participant Status" tab.
2 participants