-
Notifications
You must be signed in to change notification settings - Fork 82
[API] Support time filter for list applications #10636
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
Conversation
13f97fa to
a7cd8cb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10636 +/- ##
=========================================
Coverage 83.38% 83.39%
- Complexity 4520 4522 +2
=========================================
Files 522 522
Lines 19973 19980 +7
Branches 1301 1301
=========================================
+ Hits 16655 16662 +7
Misses 2816 2816
Partials 502 502 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a7cd8cb to
f82ccad
Compare
f82ccad to
e5278d1
Compare
e5278d1 to
0480d37
Compare
gwendolyngoetz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I was playing around with it testing different dates. The only two things I can across:
- calculating the date zoneId (mentioned below)
- if both the fromDate and toDate are the same down to the millisecond for the record it doesn't match. Example if the submit date of the record (in localtime) is "2025-04-29T15:47:15.687298", and both the fromDate and toDate are that same value you don't get the record. I don't see this being a problem we need to handle, but may be worth noting.
Great catch. This is because |
It's only an issue if someone tries to get records at a fraction of a millisecond level. Realistically no one is going to do that. As long as it's clear that fromDate/toDate need to be in the docs we're fine. |

Description
List applications have
fromDateandtoDateparameters that receive an ISO-8601 date (YYYY-MM-DD). This PR updates the date parser to support time stamps, still with the ISO-8601 format.In order to not break current calls, we need to continue supporting only date parameters. Therefore, we introduce
parseIso8601DateToLocalDateTimeInstant(dateString)with three parsing scenarios in order of preference:Since we are maintaining existing functionality, this change is not under a feature flag
User-facing documentation will be updated in civiform/docs#559
Checklist
General
Read the full guidelines for PRs here
civiform/developers, or a more specific round-robin listisDevOrStagingIssue(s) this completes
Part of #5483