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

fix: Update Time/TimeRange/Date validations (M2-8302) #573

Merged
merged 8 commits into from
Feb 5, 2025

Conversation

ChaconC
Copy link
Contributor

@ChaconC ChaconC commented Jan 30, 2025

  • Tests for the changes have been added

📝 Description

Updates Time/TimeRange/Date item conditional logic validations

🔗 Jira Ticket M2-8302
🔗 Jira Ticket M2-8619

Changes include:

  • Update mismatched TimeRange types
  • Update time parse on Greater Than/Less Than/Equal To/Not Equal conditions
  • Update date parse on Greater Than/Less Than/Equal To/Not Equal conditions
  • Fixes crash when entering TimeRange values

🪤 Peer Testing

Applet on Amplify

Use the provided applet in the linked amplify environment:

Credentials:
user: pr573@example.com
pass: pr573!

CleanShot 2025-01-30 at 15 13 41

  • Complete the provided Activities for testing Time, Time Range and Date item type conditional logic
  • Each activity includes a summary of test cases and expected validations
  • Testing the same Applet on the dev environment will fail validations or crash

Note

On "Between of" and "Outside of" conditions, boundaries are treated as failures.
For example, for the rule "Time is Between 09:00 and 10:00" a response of 09:00 will not pass validation.

Local Testing

  • Create an applet containing Time, TimeRange and Date item types
  • Add at least 1 other items
  • Create conditional logic using: GREATER_THAN, LESS_THAN, EQUAL, NOT_EQUAL, BETWEEN, OUTSIDE conditional rules for each item

Note

Use ChildMindInstitute/mindlogger-admin#2023 to avoid issues while saving conditional logic Dates/Time item types

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-573.d15zn9do8xbzga.amplifyapp.com

Copy link
Contributor

@farmerpaul farmerpaul left a comment

Choose a reason for hiding this comment

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

Seeing these bugs fixed, thanks for preparing the demo activity! Code looks good.

@ChaconC ChaconC merged commit 3b22c35 into dev Feb 5, 2025
4 checks passed
@ChaconC ChaconC deleted the fix/M2-8302-time-validation branch February 5, 2025 20:00
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