@ifoche this is the final results of the investigation:
Context
Server: https://clone.psi-mis.org
user: KEdemo1
Program: KE HNQIS Hypertension (u6pCofOY3O7)
Data Element to Remove: KE HNQIS HT.HT-300-Applies BP cuff correctly (fFBBXYbUDr7)
Goals
The removed question should not appear in the Android form
The removed question should not count in the composite score
Execute pending push in devices with old metadata should work without errors or conflicts
Server Options
Remove the data element from the program stage section (create data entry form tab in web) and mark as non-mandatory if required.
This currently provoke errors during the pull but changes in this branch avoid the error:
feature/allow_data_elements_not_added_to_program_section
Remove the data element from the program directly
I have testing this scenario and dhis2 api does not fail sending an event with data element that not exist in the program
note: sometimes push is not executed turning from airplane mode on to off, then start the app again.
Testing for server option 1:
from feature/allow_data_elements_not_added_to_program_section branch
Case 1:
Android: Create a survey with airplane mode on for KE HNQIS Hypertension, answer all critical steps (5)
Web: In dhis2 remove the data element ‘KE HNQIS HT.HT-300-Applies BP cuff correctly’ from the section and mark as non-mandatory
Android: Turn airplane mode off and wait to push
Android: the push should be executed correctly
Case 2: Apply after case 1
Android: Refresh metadata
Android: Create a survey for KE HNQIS Hypertension, answer all critical steps (4)
Android: In feedback, the composite score should be 100% without count removed question from the section in the server
Android: wait to push and the push should be executed correctly
Testing for server option 2:
from v1.6_hnqis branch
Case 1:
Android: Create a survey with airplane mode on for KE HNQIS Hypertension, answer all critical steps (5)
Web: In dhis2 remove the data element ‘KE HNQIS HT.HT-300-Applies BP cuff correctly’ from the program
Android: Turn airplane mode off and wait to push
Android: the push should be executed correctly
Case 2: Apply after case 1
Android: Refresh metadata
Android: Create a survey for KE HNQIS Hypertension, answer all critical steps (4)
Android: In feedback, the composite score should be 100% without count removed question from the section in the server
Android: wait to push and the push should be executed correctly
@ifoche this is the final results of the investigation:
Context
Server: https://clone.psi-mis.org user: KEdemo1 Program: KE HNQIS Hypertension (u6pCofOY3O7) Data Element to Remove: KE HNQIS HT.HT-300-Applies BP cuff correctly (fFBBXYbUDr7)
Goals
Server Options
note: sometimes push is not executed turning from airplane mode on to off, then start the app again.
Testing for server option 1:
from feature/allow_data_elements_not_added_to_program_section branch
Case 1:
Case 2: Apply after case 1
Testing for server option 2:
from v1.6_hnqis branch
Case 1:
Case 2: Apply after case 1