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

Zipcode searching does not work for zipcodes starting with 0 #320

Open
1 of 2 tasks
ymaheshwari1 opened this issue Oct 2, 2024 · 1 comment
Open
1 of 2 tasks
Assignees
Labels
bug Something isn't working hacktoberfest Good issue for Hacktoberfest event

Comments

@ymaheshwari1
Copy link
Contributor

ymaheshwari1 commented Oct 2, 2024

Current behavior

When searching for a zipcode starting with 0, we get an error regarding zipcode not being found, but there are zipcodes in US starting with 0 (02134).

Expected behavior

Searching should work for all the valid US zipcodes.

Steps to reproduce the issue

  1. Go to details page for any facility
  2. Click the edit button on the Latitude & Longitude card
  3. Search for a zip code starting with 0 (02134) by clicking the Generate button
  4. Verify that an error toast message is displayed
  5. Search for the zipcode again but after removing leading 0 (2134), and verify that the latlng are generated successfully

Can you handle fixing this bug by yourself?

  • YES
  • NO

Environment details

  • Browser:
  • OS:
  • Code Version:

Additional information

Update the api payload to pass q: "postcode: 02134 OR 2134" when searching for a zipcode with a leading 0.

Also need to update the logic when checking for valid zipcode on the details page, as when moving to the facility details page, we check whether the postalCode and lat-lng already added on the facility matches or not, and if not we display the postalCode in red, so need to update the logic here that if the added postalCode on the facility starts with a 0, then match the postalCode with the response postal code for both values(02134 OR 2134).

@ymaheshwari1 ymaheshwari1 added bug Something isn't working hacktoberfest Good issue for Hacktoberfest event labels Oct 2, 2024
@ymaheshwari1
Copy link
Contributor Author

We have similar functionality when adding address to facility, also check for any other place where this needs to be handled.

@ymaheshwari1 ymaheshwari1 moved this from 📋 Backlog to 📅 Planned in Digital Experience Platform Oct 29, 2024
@R-Sourabh R-Sourabh moved this from 📅 Planned to 🏗 In progress in Digital Experience Platform Oct 29, 2024
R-Sourabh added a commit to R-Sourabh/facilities that referenced this issue Nov 5, 2024
@R-Sourabh R-Sourabh moved this from 🏗 In progress to 👀 In review in Digital Experience Platform Nov 5, 2024
R-Sourabh added a commit to R-Sourabh/facilities that referenced this issue Nov 6, 2024
R-Sourabh added a commit to R-Sourabh/facilities that referenced this issue Nov 7, 2024
R-Sourabh added a commit to R-Sourabh/facilities that referenced this issue Nov 7, 2024
ymaheshwari1 added a commit that referenced this issue Nov 7, 2024
Fixed: Zip codes starting with 0 now generate the latitude and longitude correctly(#320)
@ymaheshwari1 ymaheshwari1 moved this from 👀 In review to ⏸️ Dev complete in Digital Experience Platform Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest Good issue for Hacktoberfest event
Projects
Status: ⏸️ Dev complete
Development

No branches or pull requests

2 participants