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

Override old "documents" fields with new "attachments" fields #1655

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

barrucadu
Copy link
Contributor

@barrucadu barrucadu commented Feb 17, 2020

If both are set and the attachments field is the same size as the
documents field. If they're not the same size an error is logged. We
can use this to be confident that, after republishing everything,
we've not somehow lost any data.

When we're happy to remove the old field, we can revert this commit
and just use the new field directly.


Trello card

Visual regression results:
https://government-f-msw-rfc-11-dk2x9g.surge.sh/gallery.html

@bevanloon bevanloon temporarily deployed to government-f-msw-rfc-11-dk2x9g February 17, 2020 12:33 Inactive
def initialize(old_list, new_list)
@content_item = {
"base_path" => "/a/base/path",
"details" => { "old_badness" => old_list, "new_hotness" => new_list }.compact,
Copy link
Contributor

Choose a reason for hiding this comment

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

Love those key names 😆

@bevanloon bevanloon temporarily deployed to government-f-msw-rfc-11-dk2x9g February 17, 2020 13:24 Inactive
If both are set and the attachments field is the same size as the
documents field.  If they're not the same size an error is logged.  We
can use this to be confident that, after republishing everything,
we've not somehow lost any data.

When we're happy to remove the old field, we can revert this commit
and just use the new field directly.
@bevanloon bevanloon temporarily deployed to government-f-msw-rfc-11-dk2x9g February 17, 2020 14:10 Inactive
@barrucadu
Copy link
Contributor Author

Got an error on the heroku preview app when I tried to preview a random consultation, just checking that out now

@barrucadu
Copy link
Contributor Author

Looks unrelated, and the master branch preview for consultations is broken too

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.

3 participants