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

Rake task to create draft licence finder transaction #630

Merged
merged 1 commit into from Jun 19, 2017
Merged

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jun 19, 2017

Rake task depends on changes to https://github.com/alphagov/licence-finder

  • Replace already used calculators rake task with licence finder one
  • Copies content from live /licence-finder page
  • The path needs to be claimed so that Publisher can publish to it (this will stop Licence Finder from publishing to that path too)
  • Draft a start page with content that's currently live
  • Delete any old artefact owned by licencefinder so new artefact can be created
    • Use existing content_id so that content doesn't need to be unpublished (which would risk users not seeing the page)

Example draft created

screen shot 2017-06-19 at 08 24 14

@binaryberry

namespace :licence_finder do
desc "Create draft start page for licence finder"
task licence_finder_draft: :environment do
# Claim child benefit tax calculator path from calculators

This comment has been minimized.

@binaryberry

binaryberry Jun 19, 2017
Contributor

Both comments need to be updated to licence-finder

This comment has been minimized.

@fofr

fofr Jun 19, 2017
Author Contributor

Fixed and updated.

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

UpdateWorker.perform_async(edition.id.to_s)
puts "Pushing draft to publishing API: https://draft-origin.integration.publishing.service.gov.uk/child-benefit-tax-calculator"

This comment has been minimized.

@binaryberry

binaryberry Jun 19, 2017
Contributor

url needs to be updated

This comment has been minimized.

@fofr

fofr Jun 19, 2017
Author Contributor

Fixed and updated. I've also removed the environment part of URL as this will vary.


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

This comment has been minimized.

@binaryberry

binaryberry Jun 19, 2017
Contributor

Should we also add tagging data to this, as it determines the related links and breadcrumbs? Or did you want to add it in the UI later?

This comment has been minimized.

@fofr

fofr Jun 19, 2017
Author Contributor

Tagging data will automatically be included as tags are associated with paths.

* Replace already used calculators rake task with licence finder one
* Copies content from live /licence-finder page

* The path needs to be claimed so that Publisher can publish to it
  (this will stop Licence Finder from publishing to that path too)
* Draft a start page with content that's currently live
* Delete any old artefact owned by licencefinder so new artefact can be
created
  * Use existing content_id so that content doesn't need to be
unpublished (which would risk users not seeing the page)
@fofr fofr force-pushed the licence-finder branch from dcea8c1 to b1bb323 Jun 19, 2017
@fofr fofr merged commit ac1bf7f into master Jun 19, 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 licence-finder branch Jun 19, 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.