-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Treat empty as null values to fix case search #2779
Conversation
@damagatchi retest this please |
dbcf064
to
01c557e
Compare
@damagatchi retest this please |
3 similar comments
@damagatchi retest this please |
@damagatchi retest this please |
@damagatchi retest this please |
01c557e
to
162f5c4
Compare
@damagatchi retest this please |
3901f00
to
b259746
Compare
@damagatchi retest this please |
6ba917f
to
55d1edd
Compare
@damagatchi retest this please |
4 similar comments
@damagatchi retest this please |
@damagatchi retest this please |
@damagatchi retest this please |
@damagatchi retest this please |
@damagatchi retest this please |
4 similar comments
@damagatchi retest this please |
@damagatchi retest this please |
@damagatchi retest this please |
@damagatchi retest this please |
@shubham1g5 can you review the changes I made? |
if (position > 0) { | ||
val choices = queryPrompt.itemsetBinding!!.choices | ||
val selectChoice = choices[position - 1] | ||
value = selectChoice.value | ||
updateAnswerAndRefresh(queryPrompt, selectChoice.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avazirna what prompted this change ? What if user clears the spinner choice and selects nothing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shubham1g5 because of an infinite loop, when the data source is set for the first time and onItemSelected
is called, it calls the updateAnswerAndRefresh with an empty String
value; and in that method, when oldAnswer == null || !oldAnswer.contentEquals(answer)
is true
, we are now setting the user answer value to null
which means that when we call refreshView() and refresh the data source again and onItemSelected
is triggered again with an empty String, oldAnswer == null || !oldAnswer.contentEquals(answer)
continues to evaluating to true
, and so on. And you are right, this option misses the scenario when the user changes back to an, I thought the index started at 1. Let me fix that, there is another scenario I tested with.
curious how did we resolve the Jenkins getting stuck issue with this PR ? |
53398c0
to
509a3a6
Compare
…ompt answer is not set
509a3a6
to
8baf5d0
Compare
@shubham1g5 can I have another look at this? |
@avazirna looks good to me, consider it approved from my side. |
Summary
https://dimagi.atlassian.net/browse/QA-6604
This is a workaround until we start supporting blank value search on mobile similar to what we did on Web Apps
Feature Flag
CASE_SEARCH_CLAIM
Safety Assurance
Automated test coverage
not adding tests right now as it's a temp workaround we wish to remove soon
cross-request: dimagi/commcare-core#1421