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

Request Enketo IDs during request when form is created or published #989

Merged
merged 5 commits into from
Sep 18, 2023

Conversation

matthew-white
Copy link
Member

@matthew-white matthew-white commented Sep 15, 2023

This PR addresses three cases related to getodk/central#385:

  • When a form is created for the first time, request an enketoId for the draft.
  • When a form is published for the first time, request an enketoId and enketoOnceId for the form.
  • When a form is created for the first time and immediately published (via the ?publish=true flag of the API, thereby skipping a draft), request an enketoId and enketoOnceId for the form.

These are the last cases to address, so this PR closes getodk/central#385.

Does this change require updates to the API documentation? If so, please update docs/api.md as part of this PR.

I quickly searched the API docs for "Enketo", but I didn't see anything that needed to case.

Before submitting this PR, please make sure you have:

  • run make test-full and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

Copy link
Member Author

@matthew-white matthew-white left a comment

Choose a reason for hiding this comment

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

Notes from interactive code review.

I may make additional changes before merging, especially adding more tests. @ktuite and I will review significant changes next week.

lib/model/query/forms.js Show resolved Hide resolved
test/integration/fixtures/02-forms.js Outdated Show resolved Hide resolved
test/integration/fixtures/02-forms.js Outdated Show resolved Hide resolved
test/integration/setup.js Outdated Show resolved Hide resolved
test/integration/api/forms/draft.js Show resolved Hide resolved
@matthew-white matthew-white merged commit 2221261 into master Sep 18, 2023
4 checks passed
@matthew-white matthew-white deleted the faster-enketo-ids branch September 18, 2023 05:04
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.

Speed up enabling buttons to open form in Enketo
2 participants