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 bug with the location search on conditional alerts screen #35157

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

AddisonDunn
Copy link
Contributor

Product Description

When selecting an organization as a recipient for a conditional alert, the search/dropdown to select a location does not work:

Screenshot 2024-09-30 at 4 21 36 PM

The dropdown is broken, so you can't select a new location recipeint for new/existing alerts, though existing alerts and their already-chosen recipients should be fine.

Introduced in #34912.

Technical Summary

The error message returned by the request to get the locations for the dropdown is:

__init__() got an unexpected keyword argument 'case_sharing_only'

This is because the recent changes introduced an init method LocationOptionsController.__init__ which does not allow for other kwargs, like case_sharing_only. This PR allows for other kwargs to be passed to __init__.

Safety Assurance

Safety story

  • LocationOptionsController is only used in two places, and you can see how its initiated
  • The fix works locally, and I confirmed the user location selection widget looks OK locally
  • There are some automated tests for LocationsSearchViewTest

Automated test coverage

corehq.apps.locations.tests.test_views:LocationSearchViewTest

QA Plan

None planned.

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

(original bug would be re-introduced)

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@AddisonDunn AddisonDunn added the product/all-users-all-environments Change impacts all users on all environments label Sep 30, 2024
@AddisonDunn AddisonDunn requested a review from Jtang-1 September 30, 2024 20:32
@AddisonDunn AddisonDunn marked this pull request as ready for review September 30, 2024 20:32
@AddisonDunn
Copy link
Contributor Author

Thanks reviewers!

@AddisonDunn AddisonDunn merged commit a3f46bf into master Oct 3, 2024
13 checks passed
@AddisonDunn AddisonDunn deleted the ad/fix-alerts-screen-location-search branch October 3, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/all-users-all-environments Change impacts all users on all environments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants