Fix URL path in links for candidate raw filings links #3008
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently, The URL in links to candidate profile pages on
Raw filings
hascommittee
instead ofcandidate
in the path. This happens because the API data that builds theRaw filings table
has candidate IDs in the committee ID parameter. This PR changes the path tocandidate
if the ID begins withH, S or P
.Issue 2865: Candidate links on raw filings datatable 404
Note: Many of the candidate (and committee) links on the first one or two pages of Raw filings datatable will still return a 404 because this is Raw, unprocessed data and often a profile page has not yet been created for these recent filings. For example, while testing this over several days, on one day, only one of the six candidate links on the first two pages worked.
Delving into this issue exposed the broader UX/Usability issue where we are regularly and knowingly presenting broken links to the user which could effecting bounce-rates and user-confidence. The following issue offers an attempt to mitigate this: #2993
Impacted areas of the application
fec/static/js/modules/columns.js
How to test
candidate
in the path (pointing to a candidate profile page)Please note that many of these links may return a 404 because a candidate profile page does not yet exist.