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

Recalculate form fields when page is turned #3920

Merged
merged 2 commits into from
Sep 19, 2017
Merged

Conversation

alxndrsn
Copy link
Contributor

Attempt to work around jr:choice-name() performance issues by reclalculating
fields one more time on form load, and on every page change. If choice-name()s
only reference fields on different pages, or vice versa, then maybe they will
become usable.

Issue: #3870

This kind of does the job, but:

  • breaks the back button in forms
  • doesn't seem to populate the phone number for a contact in the textarea:

screen shot 2017-09-15 at 17 21 54

Attempt to work around jr:choice-name() performance issues by reclalculating
fields one more time on form load, and on every page change.  If choice-name()s
only reference fields on different pages, or vice versa, then maybe they will
become usable.

Issue: #3870
@alxndrsn alxndrsn requested a review from abbyad September 15, 2017 15:22
@garethbowen
Copy link
Contributor

I've fixed the back button and the unit tests. I think the message is trying to populate the patient_id not the phone number - I suspect Antoine doesn't have one, so that's as expected.

@abbyad
Copy link
Contributor

abbyad commented Sep 19, 2017

Good call, that person does not have a patient_id

Copy link
Contributor

@garethbowen garethbowen left a comment

Choose a reason for hiding this comment

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

I've made a tweak and it looks good to me. Merging so it can be tested.

@garethbowen garethbowen merged commit f528578 into master Sep 19, 2017
@garethbowen garethbowen deleted the manual-recalc branch September 19, 2017 04:25
garethbowen pushed a commit that referenced this pull request Sep 20, 2017
Attempt to work around jr:choice-name() performance issues by reclalculating
fields one more time on form load, and on every page change.  If choice-name()s
only reference fields on different pages, or vice versa, then maybe they will
become usable.

Issue: #3870
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