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

Expressions that use an end preloaded timestamp don't get a value #618

Open
lognaturel opened this issue Jan 15, 2021 · 0 comments
Open

Comments

@lognaturel
Copy link
Member

Software versions

All versions

Problem description

An end preloaded timestamp is computed at the very end of form filling session. Calculations that depend on it are not triggered.

Users may want to do something like compute total time spent in form using end - start: https://forum.getodk.org/t/unexpected-behaviour-of-the-now-function/17302

Steps to reproduce the problem

<bind jr:preload="timestamp" jr:preloadParams="end" nodeset="/data/end" type="dateTime"/>
<bind nodeset="/data/calc" calculate="/data/end * 2"/>

/data/calc will not be populated.

Expected behavior

It's unexpected and inconsistent that dependent calculations wouldn't update.

The comment on IPreloadHandler.handlePostProcess says "handles any post processing tasks that should be completed after the form entry interaction is completed." As far as I can tell, there isn't an easy way to trigger a recomputation after. It's still something we should explore.

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

No branches or pull requests

1 participant