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

Update to latest enketo-core #7599

Closed
jkuester opened this issue Apr 25, 2022 · 6 comments · Fixed by #8528
Closed

Update to latest enketo-core #7599

jkuester opened this issue Apr 25, 2022 · 6 comments · Fixed by #8528
Assignees
Labels
Dependencies Update the project's dependencies/libraries Enketo Affects Enketo forms Type: Performance Make something faster
Milestone

Comments

@jkuester
Copy link
Contributor

Describe the issue
Not to be confused with #6345 which is upgrading to enketo-core to ^5.18.1, this issue is for upgrading to the next latest version of Enekto (since it already contains several fixes that we know we would like).

Describe the improvement you'd like
Once we have upgraded to the latest enketo-core, these are no longer necessary (since they are included in the new Eneketo code) and can be removed:

@jkuester jkuester added Type: Technical issue Improve something that users won't notice Enketo Affects Enketo forms labels Apr 25, 2022
@jkuester
Copy link
Contributor Author

Note that we will need to pay attention to enketo/enketo#82 since those changes will almost certainly require some changes to how we are handling saving the inputs data.

@garethbowen garethbowen added this to the 4.1.0 milestone Nov 13, 2022
@mrjones-plip mrjones-plip modified the milestones: 4.1.0, 4.2.0 Dec 5, 2022
@latin-panda latin-panda added the Dependencies Update the project's dependencies/libraries label Dec 20, 2022
@garethbowen garethbowen modified the milestones: 4.2.0, 4.3.0 Mar 16, 2023
@jkuester
Copy link
Contributor Author

The current CHT/Enketo has a weird behavior (described in this forum thread) where some kind of weird conflict occurs when a calculating a repeat_count based on a field that has a choice_filter. This issue appears to be fixed in the latest version of Enketo (I cannot recreate the behavior on https://getodk.org/xlsform/), but we should ensure this is fixed in the CHT when upgrading to the latest version of Enketo.

To recreate the issue, make a form with the following:

survey:

type name label::en appearance calculation choice_filter repeat_count
begin group begin   field-list      
select_one yes_no yes_or_no Yes or No        
select_multiple yes_no_translations selected_translations Translations     category=${yes_or_no}  
begin repeat my_translations "No" translations       if(${yes_or_no}='yes',0,count-selected(${selected_translations}))
calculate my_calc     selected-at(${selected_translations}, position(..)-1)    
note my_note Selected: ${my_calc}        
end repeat my_translations          
end group begin          

�choices:

list_name name label::en category
       
yes_no yes Yes  
yes_no no No  
       
yes_no_translations yes Yes yes
yes_no_translations ja Ja yes
yes_no_translations oui Oui yes
yes_no_translations no No no
yes_no_translations nein Nein no

Then upload the form to a CHT instance and follow these steps:

  • Open the form
  • Select Yes for the "Yes or No" question
  • For "Translations", select more than one option (does not matter which ones)
  • Go back to the "Yes or No" question and change the answer to No
  • For "Translations", select more than one option (does not matter which ones)
  • See that the ""No" translations" repeat does not work correctly.
    • The notes are not properly formatted
    • There is to 1 entry, but instead it starts from 2.

image

This broken behavior does not happen when just choosing No as the original answer to the "Yes or No" question...

@garethbowen
Copy link
Member

Bumping to 4.4.0 as we're almost ready to release 4.3.0 and this has more work needed yet.

@garethbowen garethbowen modified the milestones: 4.3.0, 4.4.0 Aug 1, 2023
@garethbowen garethbowen modified the milestones: 4.4.0, 4.5.0 Sep 12, 2023
@m5r
Copy link
Member

m5r commented Sep 13, 2023

Quick recap of what happened so far:

Now all tests are passing, even the ones included in #8480 - I merged them in a temporary branch just to make sure that they would pass in CI


Here is what the next steps look like:

Calling in @jkuester @tatilepizs for anything I might have missed

@m5r m5r modified the milestones: 4.4.1-FR-ENKETO, 4.6.0 Dec 6, 2023
@m5r m5r closed this as completed in #8528 Dec 6, 2023
m5r added a commit that referenced this issue Dec 6, 2023
Co-authored-by: Mokhtar <mokht@rmi.al>
Co-authored-by: Tatiana Lépiz <94494491+tatilepizs@users.noreply.github.com>
Co-authored-by: tatilepizs <tatiana@medic.org>
Co-authored-by: Joshua Kuestersteffen <jkuester@kuester7.com>
@garethbowen
Copy link
Member

Make sure the release notes include graphs of the performance improvements this brings. This is probably just based on these graphs: https://forum.communityhealthtoolkit.org/t/feature-testing-enketo-7-uplift-for-cht-core/3196/2

@garethbowen garethbowen added Type: Performance Make something faster and removed Type: Technical issue Improve something that users won't notice labels Jan 24, 2024
@garethbowen
Copy link
Member

Changed to a "performance" improvement as this has been measured to provide noticeable gains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Update the project's dependencies/libraries Enketo Affects Enketo forms Type: Performance Make something faster
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants