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

CARDS-2521: WSORD when filter forms on the dashboard by Survey events / Discharged #1894

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

veronikaslc
Copy link
Contributor

@veronikaslc veronikaslc commented Feb 5, 2025

This is draft PR to discuss CARDS-2521: WSORD when filter forms on the dashboard by Survey events / Discharged

Problems that caused issues are in parsing yyyy-MM-dd'T'HH:mm:ss.sssZ strings from Survey events.xml as date format:

  • MUI: The token "sssZ" is not supported by the Date and Time, date format tokens are case sensitve where s code seconds and S milliseconds
  • Internal code for parsing jsx date/time formats was not counting on formats containing all possible tokens including milliseconds

Steps to test:

  • start in prems mode
  • add a dashboard filter on "Invitation email sent on"
  • new filter should apprear

Problems remaining after token parsing fix - try to set a date and observe a mess:

  • MUI X DateTimePicker component does not support milliseconds view, it supports only six views: day, month, year, hours, minutes and seconds. Meaning there is no way to set any decimal fractions of a second for provided date-time questions format of Survey events.

Possible solutions:

  • Drop everything after seconds in formatting dates for Survey events
  • Make a cusom DatePicker to support our needs, if milliseconds are indeed needed

@marta-
Copy link
Contributor

marta- commented Feb 5, 2025

I suggest that we drop everything after second, I can't think of a practical scenario where ms are needed for filtering.

… / Discharged

Ignore milliseconds for Seurvey events date format
@veronikaslc veronikaslc marked this pull request as ready for review February 5, 2025 17:55
@@ -125,7 +125,7 @@
</property>
<property>
<name>dateFormat</name>
<value>yyyy-MM-dd'T'HH:mm:ss.sssZ</value>
<value>yyyy-MM-dd'T'HH:mm:ss</value>
Copy link
Member

Choose a reason for hiding this comment

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

@marta- These changes may break YE's workflows/dashboard, WDYT?

@veronikaslc veronikaslc requested a review from marta- March 4, 2025 18:34
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.

3 participants