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

2646 pre and post 2019 election attendance #2647

Conversation

xybrnet
Copy link
Contributor

@xybrnet xybrnet commented Jul 3, 2019

This is a bit ugly, but we need to differentiate 2019 attendance between pre- and post-election records, the dividing date being the opening of the 6th parliament, 1 July 2019.

The PMG API returns annual data from 1 Jan - 31 Dec, so if the user has selected to view records for 2019 (which is the default view for the page until there we receive records for 2020), we divide the results into those before and after 1 July 2019 return the selected records.

Copy link
Member

@chrismytton chrismytton left a comment

Choose a reason for hiding this comment

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

Thanks for this @xybrnet! Looks like there's something not quite right though, I'm seeing "2019 - post elections" twice in the dropdown on the attendance page:

image

I'm guessing one of these should be pre-elections? 🙂

@xybrnet xybrnet force-pushed the 2646-pre-and-post-2019-election-attendance branch from 338d9e1 to 7a39485 Compare July 8, 2019 08:25
@xybrnet
Copy link
Contributor Author

xybrnet commented Jul 8, 2019

Thank you for catching that @chrismytton.
I've updted first commit to include the fix.

@chrismytton
Copy link
Member

Thank you for catching that @chrismytton.
I've updted first commit to include the fix.

Thanks! Will take another look at this today.

Copy link
Member

@chrismytton chrismytton left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks again @xybrnet! 👍

Will get this merged and deployed this afternoon.

@chrismytton chrismytton merged commit 7a39485 into mysociety:master Jul 8, 2019
@chrismytton
Copy link
Member

@xybrnet This has now been deployed to the live site: https://www.pa.org.za/mp-attendance/

@xybrnet
Copy link
Contributor Author

xybrnet commented Jul 10, 2019

Thank you for pushing this out @chrismytton!

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

Successfully merging this pull request may close these issues.

2 participants