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

Add rake tasks for claiming & drafting calculator start page (a transaction) #629

Merged
merged 2 commits into from Jun 13, 2017

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jun 8, 2017

Move the start page for the child tax benefit calculator from calculators to Publisher/Frontend.
Part of https://trello.com/c/rz7jFckZ/

This will allow content designers to make changes to the content and will make the page consistent with other start pages.

  • The path needs to be claimed so that Publisher can publish to it
    (this will stop Calculators from publishing to that path too)
  • Draft a start page with content that's currently live
  • Delete any old artefact owned by calculators so new artefact can be created
    • Maintain Need IDs
    • Use existing content_id so that content doesn't need to be unpublished
      (which would risk users not seeing the page)

Steps to switch the start page:

  • Merge and deploy: alphagov/calculators#185
  • Run claim rake task
  • Run draft rake task
  • Preview draft, send to review, skip review then publish

cc @kevindew

@fofr fofr closed this Jun 8, 2017
@fofr
Copy link
Contributor Author

@fofr fofr commented Jun 8, 2017

Closing until alphagov/calculators#185 is re-opened with fix.

@fofr
Copy link
Contributor Author

@fofr fofr commented Jun 8, 2017

Problem with alphagov/calculators#185 fixed, re-opening.

@fofr fofr reopened this Jun 8, 2017
@fofr fofr requested a review from kevindew Jun 12, 2017
Copy link
Member

@kevindew kevindew left a comment

Looks good too - just a minor comment

if edition.save
puts "Draft edition created: https://publisher.integration.publishing.service.gov.uk/editions/#{edition.id}"
end
end

This comment has been minimized.

@kevindew

kevindew Jun 12, 2017
Member

Do you need to catch if either of these fail? you might want to just run artefact.save! so it throws an exception and then you can dodge the conditionals.

This comment has been minimized.

@fofr

fofr Jun 13, 2017
Author Contributor

Commit updated.

fofr added a commit to alphagov/calculators that referenced this pull request Jun 13, 2017
After Publisher has claimed the start page
(alphagov/publisher#629) this app will no
longer be able to publish to that route. This rake task will error
which will prevent the app from being deployable.

* Only publish the form
* Code to remove start page and refactor content item logic will follow
in separate PR
@fofr fofr mentioned this pull request Jun 13, 2017
2 of 2 tasks complete
@fofr fofr force-pushed the rake-calculators branch from 3b9c971 to 195eca0 Jun 13, 2017
* The path needs to be claimed so that Publisher can publish to it
  (this will stop Calculators from publishing to that path too)
* Draft a start page with content that's currently live
* Delete any old artefact owned by calculators so new artefact can be created
  * Maintain Need IDs
  * Use existing content_id so that content doesn't need to be unpublished
    (which would risk users not seeing the page)

Steps to switch the start page:
* Merge and deploy: alphagov/calculators#185
* Run `claim` rake task
* Run `draft` rake task
* Preview draft, send to review, skip review then publish
@fofr fofr force-pushed the rake-calculators branch from 195eca0 to 1fb52e0 Jun 13, 2017
edition[:more_information] = more_information
edition[:overview] = overview

edition.save!

This comment has been minimized.

@kevindew

kevindew Jun 13, 2017
Member

You should just need to add this in to which hopefully will update draft stack.

UpdateWorker.perform_async(edition.id.to_s)

Allow draft to be previewed on the draft stack before publishing.
Copy link
Member

@kevindew kevindew left a comment

LGTM 👍

@fofr fofr merged commit b400e85 into master Jun 13, 2017
2 checks passed
2 checks passed
continuous-integration/jenkins/branch This commit looks good
Details
security/snyk No new vulnerabilities
Details
@fofr fofr deleted the rake-calculators branch Jun 13, 2017
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.