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

Calculation not firing correctly for new form #16

Open
pbowen-oc opened this issue Jan 26, 2024 · 6 comments
Open

Calculation not firing correctly for new form #16

pbowen-oc opened this issue Jan 26, 2024 · 6 comments
Assignees
Milestone

Comments

@pbowen-oc
Copy link

pbowen-oc commented Jan 26, 2024

Steps:

  1. Open the attached form as a new record (/single/fs/c/i/) -
  2. Calculation not firing on new form.xml.txt
  3. Click Yes for "Was Temperature Measured?" item
  4. Observe that temperature entry fields appear with initial values of 98.6 and ⁰F.

Expected:
The calculated text item "The temperature you entered is" should display a concatenated string derived from those values: "98.6 ⁰F"

Actual:
The calculated item is empty on the screen and no submission is made for the background calculated item or the displayed calculated text item.

Screenshot 2024-01-26 015953

Note that changing the values on the form does not make a difference in this session. However, if the form is reopened as an existing record (/edit/fs/c/i/) with the basic instance generated from the initial session, then the calculated text item appears as expected and submissions are made for the background item and displayed item. Sample instance to use when reopening the form -
Calculation not firing on new form.instance.txt

Reopening form working as expected:
Screenshot 2024-01-26 020049

@pbowen-oc pbowen-oc added this to the Next milestone Jan 26, 2024
@pbowen-oc
Copy link
Author

@MartijnR @theywa - I am assuming this is related to #22.

@pbowen-oc
Copy link
Author

I just noticed that in the first pass through the form, the required items with values are still displaying the red asterisk unexpectedly. They correctly disappear when the form is reopened.

@pbowen-oc pbowen-oc changed the title Calculation not firing for new form Calculation and required not firing correctly for new form Jan 26, 2024
@MartijnR
Copy link
Member

I am assuming this is related to #22.

Yeah, probably.

@MartijnR
Copy link
Member

regarding required asterisks maybe this is related: enketo#1295

@pbowen-oc
Copy link
Author

pbowen-oc commented Jan 31, 2024

@theywa reports that #22 will fix the calculation here as well.

The Required asterisk still needs to be investigated. To be logged as a separate issue with our specific findings. We need to check required functionality beyond the asterisk (error message, autoqueries, etc.).

@pbowen-oc pbowen-oc changed the title Calculation and required not firing correctly for new form Calculation not firing correctly for new form Feb 1, 2024
@pbowen-oc
Copy link
Author

Logged new issue #14 for the red asterisk issue. That is actually a pre-existing bug and not a top priority to be fixed.

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

No branches or pull requests

3 participants