fecgov / openFEC-web-app

DEPRECATED See https://github.com/18F/fec-cms for fec.gov's code
Other
43 stars 31 forks source link

Full Election Cycle Error #1031

Closed patphongs closed 8 years ago

patphongs commented 8 years ago

@LindsayYoung and @jmcarp: My assumption is that any FULL election cycles greater than 2016 returns a 404 error. If, however, the user tries to view an existing 2 year period within those election cycles, the user will get a return for the candidate.

Scenario 1 (Senators in Class 1 Seats):

Search for Elizabeth Warren. Her election cycle defaults to 2018 full.

Request URLs: Search defaults to full cycle 2018 which returns 404. https://beta.fec.gov/data/candidate/S2MA00170/?cycle=2018&election_full=true

Change request URL to just 2016 election cycle works: https://beta.fec.gov/data/candidate/S2MA00170/?cycle=2016&election_full=false

Scenario 2 (Senators in Class 2 Seats):

Search for Mitch McConnell His election cycle defaults to 2020 full.

Request URLs: Search defaults to full cycle 2020 which returns 404. https://beta.fec.gov/data/candidate/S2KY00012/?election_full=true&cycle=2020

Change request URL to just 2016 election cycle works: https://beta.fec.gov/data/candidate/S2KY00012/?election_full=false&cycle=2016

Scenario 3 (Presidential)

Search for James Howitt. His election cycle defaults to 2020 full.

Request URL Search defaults to full cycle 2020 which returns 404 https://beta.fec.gov/data/candidate/P00004945/?cycle=2020&election_full=true

PaulClark2 commented 8 years ago

@jmcarp @LindsayYoung I thought https://github.com/18F/openFEC-web-app/issues/991 (Baldwin) fixed this issue

LindsayYoung commented 8 years ago

Baldwin is working fine https://fec-proxy.18f.gov/data/candidate/S2WI00219/?cycle=2016&election_full=false

It looks like this is a different issue specific to people up for election in 2020

patphongs commented 8 years ago

@LindsayYoung: Actually I noticed that it is an issue specific to senate elections 2018 and 2020 full cycle along with presidential full cycles 2020 and greater.

PaulClark2 commented 8 years ago

But Baldwin is a 2018 senate candidate see:

https://beta.fec.gov/data/candidate/S2WI00219/?cycle=2018&election_full=true

https://beta.fec.gov/data/candidate/S2WI00219/?cycle=2012

LindsayYoung commented 8 years ago

It looks like it fixed it for the 2-year cycle but not the full cycle, taking a look now.

LindsayYoung commented 8 years ago

We are currently determining the election cycle form the cand_cmte_linkage table, but this doesn't work well for candidates that have not registered yet- and their info is not in cand_cmte_linkage that includes a lot of Senate candidates. We could re-do the logic, but I wonder if it doesn’t make more sense to just show the current 2-year cycle for races 6 years in the future, it is not like we are going to have any data from the future to show anyway.

PaulClark2 commented 8 years ago

I think in many cases we do have candidates registered from future elections. I think we don't really need to show anything beyond 2018 (but I could be convinced).

Warren select * from CAND_CMTE_LINKAGE where cand_id = 'S2MA00170' and cand_election_yr = 2018 and cmte_tp = 'S' and cmte_dsgn in ('P', 'A');

https://beta.fec.gov/data/candidate/S2MA00170/?cycle=2016&election_full=false

It seems like a better solution to try to figure out how to sum the "full cycle" especially if we know the candidate is up for election just one cycle in the future (pretty common for senate candidates).

noahmanger commented 8 years ago

Following up on this: what do we need to do to figure this out?

noahmanger commented 8 years ago

Sanders Senate campaign has the same issue: https://beta.fec.gov/data/candidate/S4VT00033/?cycle=2018&election_full=true

noahmanger commented 8 years ago

This has been resolved on dev.