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

Limit individual contributor zip search to 5 digits #1391

Closed
1 task done
Tracked by #118
lbeaufort opened this issue Oct 26, 2017 · 5 comments
Closed
1 task done
Tracked by #118

Limit individual contributor zip search to 5 digits #1391

lbeaufort opened this issue Oct 26, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@lbeaufort
Copy link
Member

lbeaufort commented Oct 26, 2017

So that users can retrieve accurate contributor data based off zipcode, only the first 5 digits should be matched on the Individual Contributor Search. Currently, searching 5-digit zip excludes contributors with 9-digit zips, and searching 9-digit zips only returns data where the filer has provided the zip+4.

Email from data user:
_"I’m trying to do a search by zip code and would like it to match both 5 and 9 digit entries.

For example:
• If I pass in the contributor name of “frank” and “10050” for– I get 9 records back link
• However, if I add the zip code of 110502814 – I get an extra record for a total of 10 link

In this example, all that I have on my end is the 11050 zip code and I would like to use that information to get back all 10 records."_

Two proposed changes:
CMS
The zip code on this page should be limited to 5 characters

API
The zip search should match on the left(5) of the zip.

Thanks to Jason in Public Records for bringing this to my attention.

  • limit front-end input to 5 digits
@lbeaufort lbeaufort changed the title Limit individual contributor zip search to 5 characters Limit individual contributor zip search to 5 digits Oct 26, 2017
@lbeaufort lbeaufort added the Bug label Oct 26, 2017
@AmyKort AmyKort added this to the RBS 3 (Reliability, stability and bugs) milestone Nov 20, 2017
@PaulClark2
Copy link
Contributor

What's the status of this issue?

@patphongs
Copy link
Member

@PaulClark2 Put this back on my plate to do for 5.2 since this got missed the previous time. @lbeaufort Is working on an API fix and I will add a front-end fix to not allow zip codes greater than 5 digits.

@patphongs
Copy link
Member

This issue is done for the front-end, however, still waiting on fecgov/openFEC#3003 back-end PR to be implemented in order to merge this PR on the front-end

@PaulClark2 PaulClark2 modified the milestones: Sprint 5.2, Sprint 5.3 Mar 22, 2018
@AmyKort
Copy link

AmyKort commented Mar 23, 2018

Is this ready to merge?

@lbeaufort
Copy link
Member Author

@AmyKort thanks to @hcaofec and @patphongs this issue is complete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants