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: address minor form migration issues that could result in fatal errors #7023

Merged
merged 5 commits into from
Oct 11, 2023

Conversation

pauloiankoski
Copy link
Contributor

@pauloiankoski pauloiankoski commented Oct 11, 2023

Description

During the testing of Form Migrations, we encountered errors caused by minor code details. This pull request aims to resolve those issues and ensure smooth Form Migrations.

This is a summary of the changes:

  • Previously, if the attributes customAmountMin and customAmountMax were empty, they were saved as 0.0 post rounding implementation. Now, a validity check is performed on these attributes before rounding and saving them to ensure accurate data storage.
  • Identified an issue where email notifications in P2P contained open-quotes, which interfered with form settings while extracting JSON content. This has been resolved by replacing open-quotes with double-quotes before setting the notifications in the migrated form.
  • Noticed a migration step that saved the form prematurely before the migration was fully completed. This was unnecessary and had the potential to trigger unexpected side effects. This step has been rectified to ensure the form is saved only after the migration process is entirely finalized.

Affects

Form Migrations

Testing Instructions

  1. Create a new P2P campaign that creates a new form for you.
  2. Open that recently created form and migrate it to v3.
  3. The form is migrated with no errors.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@pauloiankoski pauloiankoski changed the title Fix/minor migration issues Fix: address minor form migration issues that could result in fatal errors Oct 11, 2023
@glaubersilva glaubersilva self-requested a review October 11, 2023 12:11
Copy link
Contributor

@glaubersilva glaubersilva left a comment

Choose a reason for hiding this comment

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

@pauloiankoski Nice work! Almost everything working as expected, I just left a comment about a minor detail related to the wrong quotes that still throws a fatal error.

src/FormMigration/Steps/EmailSettings.php Outdated Show resolved Hide resolved
Copy link
Contributor

@glaubersilva glaubersilva left a comment

Choose a reason for hiding this comment

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

@pauloiankoski Thanks for the update. Now it worked as expected, so looks good to QA.

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests

@pauloiankoski pauloiankoski merged commit 2d21d74 into release/3.0.0 Oct 11, 2023
8 checks passed
@pauloiankoski pauloiankoski deleted the fix/minor-migration-issues branch October 11, 2023 20:41
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