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 unopened consultations #2899

Merged
merged 2 commits into from Dec 5, 2016
Merged

Fix unopened consultations #2899

merged 2 commits into from Dec 5, 2016

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Dec 2, 2016

Consultations can be published with an open date in the future.

This back-ports one of the unopened consultation fixes that was applied to government-frontend: alphagov/government-frontend#201. This was the most grievous of the bugs fixed and shouldn't wait for migration as it misleads users.

Fixes: https://trello.com/c/GEyT6hzk/518-make-it-obvious-when-a-consultation-starts-small

Other bugs which were fixed in government-frontend, eg date formatting and the ways to respond block sometimes being empty were not trivial to fix. If migration takes a long time we should fix these in Whitehall too:
https://trello.com/c/IZp3Oo8l/526-formatting-when-consultation-ends-medium
https://trello.com/c/pEccXKHV/517-issue-with-ways-to-respond-section-in-consultations-medium

The consultation view doesn't have much existing test coverage.

Before

screen shot 2016-12-02 at 15 00 52

After

screen shot 2016-12-02 at 15 01 00

The dark purple is left over from older inside gov branding.
@@ -35,8 +35,7 @@

<%= render partial: "document_summary", locals: { document: @document } %>
</div>
<% else %>

<% elsif @document.closed? %>

This comment has been minimized.

@andrewgarner

andrewgarner Dec 2, 2016
Contributor

The catch all case contains language that is specific to an unopened consultation. I think we should have a specific case for @document.unopened?

This comment has been minimized.

@fofr

fofr Dec 2, 2016
Author Contributor

I've switched it to something more explicit:
<% elsif @document.not_yet_open? && @document.opening_at.present? %>

I don't want to do too much spelunking.

Consultations can be published with an open date in the future.
This back-ports the unopened consultation fixes that have been applied
to government-frontend, which will be used after migration.
@fofr fofr force-pushed the fix-consultations branch from f577542 to b4ff36a Dec 2, 2016
@fofr fofr merged commit 8bd84d5 into master Dec 5, 2016
1 check passed
1 check passed
default Build #10118 succeeded on Jenkins
Details
@fofr fofr deleted the fix-consultations branch Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.