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

Fix URL path in links for candidate raw filings links #3008

Merged
merged 1 commit into from
Jul 1, 2019

Conversation

johnnyporkchops
Copy link
Contributor

Summary

Currently, The URL in links to candidate profile pages on Raw filings has committee instead of candidate in the path. This happens because the API data that builds the Raw filings table has candidate IDs in the committee ID parameter. This PR changes the path to candidate if the ID begins with H, S or P.

  • Resolves Candidate links on raw filings datatable 404 #2865
    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

  • checkout branch and run `npm run build before running the branch
  • `go to http://127.0.0.1:8000/data/filings/?data_type=efiling
  • Find a candidate name and confirm that the URL in the link has 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.

@johnnyporkchops johnnyporkchops changed the title Fx URL path in links for candidate raw filings links Fix URL path in links for candidate raw filings links Jul 1, 2019
@JonellaCulmer
Copy link
Contributor

Thanks. John. Looks good to me.

Perhaps in a future iteration, let's consider removing links from those candidates/committees that 404 until a page exists.

Copy link
Member

@lbeaufort lbeaufort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lbeaufort lbeaufort merged commit 4ff7b66 into develop Jul 1, 2019
@lbeaufort lbeaufort deleted the feature/2865-raw-filings-candidate-links branch October 7, 2019 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Candidate links on raw filings datatable 404
3 participants