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

Form end meta field not correctly populated when the form ends #8974

Open
jkuester opened this issue Mar 27, 2024 · 1 comment
Open

Form end meta field not correctly populated when the form ends #8974

jkuester opened this issue Mar 27, 2024 · 1 comment

Comments

@jkuester
Copy link
Contributor

Describe the bug
CHT forms support several meta fields including start and end that are supposed to record the exact time the form began and the form ended.

Unfortunately, the end value is always just recorded as (almost) the exact same value as the start regardless of how long the user takes to fill out the form.

To Reproduce
Create a form that contains:

type name
start start
end end
  1. Begin the form
  2. Wait a bit of time (at least a few seconds)
  3. Submit the form
  4. See that the different between start and end do not match the time waiting before submitting the form.

Expected behavior
The end value should contain the time that the form was submitted.

Additional context
Originally reported on the forum.

It appears this is a regression that happened as a result of the Enekto Uplift in 4.0.0. I tested and confirmed everything works as expected in 3.17.2, but it is broken in 4.0.0.

Debugging through the Enekto code flow, it appears the start and end values are preloaded correctly, but the BeforeSave event is never triggered for the form.

@jkuester
Copy link
Contributor Author

One workaround worth noting here is that the reported_date for the report does reflect the date/time the form was completed. So, it can be referenced as the "end" time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment