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 response not showing in summary mode #3670

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

hamza-vd
Copy link
Contributor

@hamza-vd hamza-vd commented Jan 6, 2025

IMPORTANT: Where possible all PRs must be linked to a Github issue

This PR addresses some issues mentioned in this comment. The 2 spcific fixes done are:

Forms saved as draft(even those not saved as draft and filled to the end) are loosing all the answers when you open as read only .

When a questionnaire response was saved earlier as draft and later on retrieved in summary mode. The answers to the questionnaire items were empty because it searched for an in-progress QR rather than the one with completed status. This has been fixed in this commit.

The read only forms (with a green tick) have the save as draft option.

I added a check in this commit to not to show save as draft option in Summary mode

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

@hamza-vd hamza-vd requested a review from FikriMilano January 6, 2025 07:57
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 38.9%. Comparing base (d68886f) to head (f921158).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...re/engine/util/extension/QuestionnaireExtension.kt 0.0% 0 Missing and 1 partial ⚠️
...re/quest/ui/questionnaire/QuestionnaireActivity.kt 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              main   #3670   +/-   ##
=======================================
  Coverage     38.9%   38.9%           
  Complexity    1164    1164           
=======================================
  Files          284     284           
  Lines        15078   15078           
  Branches      2671    2671           
=======================================
  Hits          5872    5872           
+ Misses        8361    8360    -1     
- Partials       845     846    +1     
Flag Coverage Δ
engine 62.5% <0.0%> (ø)
geowidget 16.0% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...re/engine/util/extension/QuestionnaireExtension.kt 55.3% <0.0%> (ø)
...re/quest/ui/questionnaire/QuestionnaireActivity.kt 6.1% <0.0%> (ø)

... and 1 file with indirect coverage changes

FikriMilano
FikriMilano previously approved these changes Jan 6, 2025
Copy link
Collaborator

@FikriMilano FikriMilano left a comment

Choose a reason for hiding this comment

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

Could you be more descriptive on what you're solving here?
And if it's possible, to add a test.

@hamza-vd
Copy link
Contributor Author

hamza-vd commented Jan 6, 2025

Could you be more descriptive on what you're solving here? And if it's possible, to add a test.

Description updated and a test added

@FikriMilano FikriMilano changed the title Fixes to Save Draft Functionality Fix response not showing in summary mode Jan 8, 2025
Copy link
Collaborator

@FikriMilano FikriMilano left a comment

Choose a reason for hiding this comment

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

Thanks!

@FikriMilano FikriMilano added this pull request to the merge queue Jan 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 8, 2025
@hamza-vd hamza-vd enabled auto-merge January 8, 2025 10:06
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.

3 participants