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

VACMS-17587: Fixes revision squashing during migrate #17637

Merged
merged 8 commits into from
Mar 27, 2024

Conversation

Becapa
Copy link
Contributor

@Becapa Becapa commented Mar 26, 2024

Description

Relates to #17587.

Testing done

Manual

QA steps

As an administrator

  1. Change the title of the Hemet VA Clinic (/node/62682/edit) by updating the 'Name of facility' field, entering a 'Revision log message' and saving the node as 'Published'
    • Validate that the 'Changed name' flag is not set for this node. (/admin/content/facilities/flagged)
  2. Then run a migration import for that node.
    • Open up an SSH to the tugboat (Open environment's page on Tugboat, click the "Terminal" link on the line for the "php" service)
    • On the command line run drush migrate:import va_node_health_care_local_facility --update --idlist=vha_605GG
    • Validate that the 'Changed name' flag is set for this node. (/admin/content/facilities/flagged)
    • Validate that the latest revision for this node only includes the most recent name change from the CMS Migrator (Go to /node/62682/revisions and compare the latest two revisions)

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

Is this PR blocked by another PR?

  • DO NOT MERGE

Does this PR need review from a Product Owner

  • Needs PO review

CMS user-facing announcement

Is an announcement needed to let editors know of this change?

  • Yes, and it's written in issue ____ and queued for publication.
    • Merge and ping the UX writer so they are ready to publish after deployment
  • Yes, but it hasn't yet been written
    • Don't merge yet -- ping the UX writer to write and queue content
  • No announcement is needed for this code change.
    • Merge & carry on unburdened by announcements

@Becapa Becapa requested review from a team as code owners March 26, 2024 16:32
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 26, 2024 16:32 Destroyed
@github-actions github-actions bot added CMS Team CMS Product team that manages both editor exp and devops Facilities Facilities products (VAMC, Vet Center, etc) labels Mar 26, 2024
Copy link
Contributor

@dsasser dsasser left a comment

Choose a reason for hiding this comment

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

Changes look like what I would expect, however I'm seeing some odd behavior:

Change the title of the Hemet VA Clinic (/node/62682/edit) by updating the 'Name of facility' field, entering a 'Revision log message' and saving the node as 'Published'

I changed the title for this node, and Drupal appears to create 4 revisions:

Screenshot 2024-03-26 at 11 24 11 AM

However, on the revisions page, it shows only one change, but no mention of the flag being set in this revision log.

Screenshot 2024-03-26 at 11 27 42 AM

I'm probably just not up to speed on why the "recent changes" and the revisions page don't align, so I'm not sure how much of a problem this is at the db level, but I for the editor/support/admin, this is likely to cause confusion.

Similarly, the migration is creating several "recent changes" but only one revision, and the revision log has no mention of flags being set (on the revisions page)

Screenshot 2024-03-26 at 11 33 14 AM

Screenshot 2024-03-26 at 11 32 49 AM

@Becapa Becapa force-pushed the VACMS-17587-fix-issyncing-regression branch from 1e141ca to d5eb532 Compare March 26, 2024 20:45
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 26, 2024 20:46 Destroyed
@Becapa
Copy link
Contributor Author

Becapa commented Mar 26, 2024

Added some changes to deal with the weirdness around the multiple revisions for a flags being updated:

  • Instead of setting the isMigrating flag at the beginning and end of importing, set it at the beginning and end of the row save.
  • Toggle off the isMigrating flag during revision log updates.
  • Check for the isMigrating flag during the entity update.

Copy link
Contributor

@edmund-dunn edmund-dunn left a comment

Choose a reason for hiding this comment

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

All steps passed as expected with NO extra revisions.
Screenshot 2024-03-26 at 14 18 52
Screenshot 2024-03-26 at 14 19 30
Nice work!!

Copy link
Contributor

@dsasser dsasser left a comment

Choose a reason for hiding this comment

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

Looks great!

@Becapa Becapa requested a review from omahane March 27, 2024 13:16
Copy link
Contributor

@omahane omahane left a comment

Choose a reason for hiding this comment

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

Really great work, @Becapa . QA checks out and code looks good.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 27, 2024 18:19 Destroyed
@Becapa Becapa enabled auto-merge (squash) March 27, 2024 18:19
@Becapa Becapa merged commit a5872e6 into main Mar 27, 2024
18 checks passed
@Becapa Becapa deleted the VACMS-17587-fix-issyncing-regression branch March 27, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMS Team CMS Product team that manages both editor exp and devops Facilities Facilities products (VAMC, Vet Center, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants