What we are after
Allow customers to view 2019-2020 reports when they take the navigation path described below.
1 Candidate page
https://www.fec.gov/data/candidate/H0CO03165/ [defaults to 2022]
2 Click on linked committee
https://www.fec.gov/data/committee/C00728238/?cycle=2022
-- URL says 2022
-- Financial summary is for 2020
3 Click on filings
https://www.fec.gov/data/committee/C00728238/?cycle=2022&tab=filings
--Two-year period says 2019-2020
--Individual report sections say 2021-2022
--You cannot get 2019-2020 reports and statements to display
Other examples
https://www.fec.gov/data/candidate/S6CA00634/?cycle=2022&election_full=true
Why we are after it
Completion criteria
@PaulClark2 @JonellaCulmer The reason why only 2020 is shown for the committee page two-year period drop down is because we are relying on the list of cycles_has_activity (see the api call), which only has 2020. Versus the for the candidate, we are relying on the list of fec_cycles_in_election (see the api call), which has 2022. If we wanted to fix this, we would need to update our CMS business logic to pull from a list that has the full set of years, such as cycles. I'm unsure about what issues this may introduce, however, as I recall that we were deliberate about switching from using cycles to cycles_has_activity.
@lbeaufort @fec-jli I believe you helped to refactor this code for the candidate and committee profile pages a while ago, do you recall why we changed to cycles_has_activity, was that to fix a bug?
Changing the cycles_has_activity to cycles in the below code would achieve the desired effect of having the most recent cycle in the two-year period dropdown on the committee profile page, but I'd like to know if there are any known side effects.
@patphongs that would take the user to the committee’s 2022 profile, correct? The committee doesn’t have 2021-2022 activity, yet. I’m not sure that’s an ideal user interaction. @JonellaCulmer what do you think?
@PaulClark2 This may be a good time to conduct user testing before we finalize anything, but here are my thoughts:
We have messages that display when the candidate doesn't have any money to show. And perhaps this is an opportunity for us to be more clear in those messages and better explain why data is missing. (Right now it's very generic) But it really depends on who you talk to. Some users want to see data right away and don't want to have to continually change the two-year period to see activity.
Hypothesis 1: It's a clearer flow when moving between two pages that the time period is retained, specifically when those two pages are related to the same candidate.
Hypothesis 2: Those who know what they're looking for will expect to see the latest, even if it's the previous two year period.
I feel as though these decisions may impact our other choices to wait until the April filings. We may want to consider being more deliberate whose data we show and when. Does this need to be broken up by candidate type (H, S, P) or by committee type?
Other than that, I'll reserve judgment until we hear about any side effects from @fec-jli and @lbeaufort. We changed the endpoint for a reason.
cc: @patphongs
that would take the user to the committee’s 2022 profile, correct? The committee doesn’t have 2021-2022 activity, yet. I’m not sure that’s an ideal user interaction.
We have messages that display when the candidate doesn't have any money to show. And perhaps this is an opportunity for us to be more clear in those messages and better explain why data is missing. (Right now it's very generic) But it really depends on who you talk to. Some users want to see data right away and don't want to have to continually change the two-year period to see activity.
@PaulClark2 @JonellaCulmer @lbeaufort @fec-jli A little clarification on my part. With the change to cycles (I put a PR to test if you want to pull it down and try), it would include 2020 and 2022 in this particular committee's dropdown. When coming from the candidate profile page, the page defaults to 2022 (http://localhost:8000/data/candidate/H0CO03165/). Then when clicking to their committee page (http://localhost:8000/data/committee/C00728238/?cycle=2022) it would send 2022 cycle in the URL. That would prompt the committee page to load 2022 which would come up with this message below.

If you come to the committee profile page itself without passing through from the candidate profile page, it will default to last_cycle_has_financial (api call), which would be the 2020 cycle and show that two-year period's data by default.

Ultimately I think if we wanted to make a change, we should make it to the cycles_has_activity parameter in the endpoint. But again, there's a reason why we switched to that parameter over cycles and would like to know why.
current website
ex: C00567057
case 1: (without pass cycle parameter)
https://www.fec.gov/data/committee/C00567057/
(a)financial summary page default shows last_cycle_has_financial=2018
(b)TWO-YEAR PERIOD dropdown shows cycles_has_activity list)
case 2: (file F1)
https://www.fec.gov/data/committee/C00567057/?cycle=2020&tab=about-committee
(about-committee page default=: last_cycle_has_activity=2020 (file F1))
case 3: (pass cycle=2022, no activity)
https://www.fec.gov/data/committee/C00567057/?cycle=2022&tab=about-committee

ex: C00409011
cycles_has_financial = [2006]
(F3,F3X,F3P,F3L,F4,F5,F7,F13,F24,F6,F9,F10,F11)
cycles_has_activity = [2004,2006,2018]
(F1)
fec_cycles = [2004,2006,2008,2010,2012,2014,2016,2018,2020]
(every two year, rollover(active?)
url:
case 1) no cycle parameter passed
(default=last_cycle_has_financial, or last_cycle_has_activity)
https://www.fec.gov/data/committee/C00409011/
https://www.fec.gov/data/committee/C00708040/
case 2) passed a cycle is one of cycles_has_financial
https://www.fec.gov/data/committee/C00409011/?cycle=2006
passed cycle is in one of cycles_has_activity
https://www.fec.gov/data/committee/C00409011/?cycle=2018
case 3) passed cycle is out of cycles_has_activity but in one of fec_cycles
??
http://127.0.0.1:8000/data/committee/C00409011/
case 4) passed cycle is out of fec_cycles
page not found
https://www.fec.gov/data/committee/C00409011/?cycle=2028
After meeting today with @lbeaufort @hcaofec @fec-jli we have decided that making the change to using cycles would be problematic for several reasons:
For now, we will not make any changes, after the filings in April, this issue should be resolved. This ticket will serve as future explanation for this bug. Thank you @fec-jli @hcaofec for your detailed research on the different cycle lists above!
I've mapped out the CMS logic for cycles

Most helpful comment
url:
case 1) no cycle parameter passed
(default=last_cycle_has_financial, or last_cycle_has_activity)
https://www.fec.gov/data/committee/C00409011/
https://www.fec.gov/data/committee/C00708040/
case 2) passed a cycle is one of cycles_has_financial
https://www.fec.gov/data/committee/C00409011/?cycle=2006
passed cycle is in one of cycles_has_activity
https://www.fec.gov/data/committee/C00409011/?cycle=2018
case 3) passed cycle is out of cycles_has_activity but in one of fec_cycles
??
http://127.0.0.1:8000/data/committee/C00409011/
case 4) passed cycle is out of fec_cycles
page not found
https://www.fec.gov/data/committee/C00409011/?cycle=2028
https://github.com/fecgov/openFEC/issues/4704