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

Support/Oppose sort on IE table not functioning #2494

Closed
Tracked by #113
JonellaCulmer opened this issue Nov 6, 2018 · 12 comments
Closed
Tracked by #113

Support/Oppose sort on IE table not functioning #2494

JonellaCulmer opened this issue Nov 6, 2018 · 12 comments
Assignees
Milestone

Comments

@JonellaCulmer
Copy link
Contributor

The sort filter for Support/Oppose column on IE datatable is not currently functioning.

Need to identify the cause and fix as necessary.

Support-Oppose sort.gif

@JonellaCulmer JonellaCulmer added this to the Sprint 7.6 milestone Nov 6, 2018
@lbeaufort lbeaufort added the Bug label Nov 9, 2018
@lbeaufort lbeaufort modified the milestones: Sprint 7.6, Sprint 7.7 Nov 26, 2018
@pkfec pkfec self-assigned this Nov 28, 2018
@pkfec
Copy link
Contributor

pkfec commented Nov 28, 2018

To make the support/oppose column sortable, requires an API change on SE endpoint. There is no ticket to track the API changes. @lbeaufort Can you please create API ticket for this?

@pkfec
Copy link
Contributor

pkfec commented Nov 30, 2018

@lbeaufort i have created a new API ticket to enable the sort on ScheE endpoint by support_oppose_indicator column. fecgov/openFEC#3518

The work on API is done. I will submit a PR and have you or someone in our team review it.

@pkfec
Copy link
Contributor

pkfec commented Dec 4, 2018

@JonellaCulmer The API PR to enable support/oppose indicator on Independent Expenditures is merged to develop branch. fecgov/openFEC#3518

Can you test the sort by support/oppose on IE datatables in dev environment?

@JonellaCulmer
Copy link
Contributor Author

@pkfec The sort is working now on dev! But I noticed that regardless of which you're sorting by, there are "unknown"s that appear. Do we know how these are populating on the list?

@pkfec
Copy link
Contributor

pkfec commented Dec 7, 2018

Sort on suppose/oppose indicator column is not working because this column values are inconsistent. The column value in the backend is not always S or O. @fecjjeng identified that there are other values like 0(ZERO), UNI, SUP and Nulls.

Reached out to @jwchumley and waiting to hear from him on how to manipulate the data when the support/oppose indicator values either one of these : 0( ZERO), UNI, SUP and Nulls

@pkfec
Copy link
Contributor

pkfec commented Dec 10, 2018

after talking to @jwchumley @PaulClark2 , we all agreed to replace the non S/O values with NULL.
@fecjjeng is working on updating the s_o_ind column on SE MV here:fecgov/openFEC#3532

@pkfec
Copy link
Contributor

pkfec commented Dec 12, 2018

@JonellaCulmer the backend MV changes are merged into Dev environment. You can now test the support/oppose sort on IE screen.

@pkfec
Copy link
Contributor

pkfec commented Dec 13, 2018

@JonellaCulmer did you get a chance to test this bug in Dev environment?

@JonellaCulmer
Copy link
Contributor Author

@pkfec So that I understand, I should no longer see Unknown, but null? I'm only seeing Support or Oppose.

@pkfec
Copy link
Contributor

pkfec commented Dec 14, 2018

@JonellaCulmer Nulls on the backend are mapped to Unknowns on the CMS. Sorting is based off S/O value and not by Unknown. The Unknowns are always sorted last and they always appear at the end of the results when you sort asc or desc order on the support/oppose column.

Here is an example of IE committee with support/oppose and unknowns values. Try sorting the column and see if that makes sense.
https://fec-dev-cms.app.cloud.gov/data/independent-expenditures/?data_type=processed&committee_id=C90009358&cycle=2006&cycle=2012&is_notice=true&candidate_office=H&candidate_office_state=MI&candidate_office_state=NJ

Hope this helps!

@JonellaCulmer
Copy link
Contributor Author

@pkfec I understand! Thanks so much! Looks great to me!

@JonellaCulmer
Copy link
Contributor Author

The PR work related to this work has been merged and the fix has been reviewed. So closing this issue.

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

No branches or pull requests

3 participants