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

fix(cht-conf-test-harness#239): update contact saver to fix error #8575

Merged

Conversation

kennsippell
Copy link
Member

@kennsippell kennsippell commented Sep 22, 2023

Description

Note the base branch for this change is enketo-service-refactor. This contains a fix for medic/cht-conf-test-harness#239 but should not be merged to main. I did not open a cht-core issue for this.

In production, we have the typescript line repeated?.child_data || [];

In the enketo-service-refactor branch used by cht-conf-test-harness, we have this near enemy repeated ? repeated.child_data : [];

The behavior differs for defined values of repeated with an undefined value of child_data. This change reconciles the difference.

Code review checklist

  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or e2e where appropriate
  • Internationalised: All user facing text
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

Compose URLs

If Build CI hasn't passed, these may 404:

  • CHT_CORE_COMPOSE_URL
  • COUCH_SINGLE_COMPOSE_URL
  • COUCH_CLUSTER_COMPOSE_URL

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

Copy link
Contributor

@jkuester jkuester left a comment

Choose a reason for hiding this comment

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

👍

@jkuester
Copy link
Contributor

Thanks for the clear explanation!

@kennsippell
Copy link
Member Author

@jkuester I'm unsure if tests are still working on this branch. I can keep retrying them, but I'd love your opinion on how best to proceed. Merge master? Keep retrying? Ignore failures? etc

@jkuester
Copy link
Contributor

Oh, yeah, I would not bother with the tests on this branch anymore! (Particularly for a low-risk change like this.) I will merge this now.

The good news is that we are getting very close to a go forward solution that does not include this branch!!!! 🎉

@jkuester jkuester changed the title fix(cht-conf-test-harness#239): Failed to save app form: TypeError: Cannot read properties of undefined (reading 'map') fix(cht-conf-test-harness#239): update contact saver to fix error Sep 25, 2023
@jkuester jkuester merged commit c163949 into enketo-service-refactor Sep 25, 2023
12 of 23 checks passed
@jkuester jkuester deleted the harness-239-crash-repeat-in-contact-form branch September 25, 2023 14:40
@kennsippell
Copy link
Member Author

Thanks and good luck, sir!

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.

2 participants