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

Cascade delete interaction step #10

Merged

Conversation

crayolakat
Copy link

Fixes StateVoicesNational#1673

Description

Currently, we are unable to delete interaction steps with children. The solution is to change the foreign key constraint of parent_interaction_id in the interaction_step table to cascade delete.

Checklist:

  • I have manually tested my changes on desktop and mobile
  • The test suite passes locally with my changes
  • If my change is a UI change, I have attached a screenshot to the description section of this pull request
  • My change is 300 lines of code or less, or has a documented reason in the description why it’s longer
  • I have made any necessary changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • My PR is labeled [WIP] if it is in progress

@@ -635,14 +638,13 @@ describe("CampaignInteractionStepsForm", () => {
beforeEach(async () => {
await setupTest();

const startedCampaign = await createStartedCampaign();
Copy link
Author

Choose a reason for hiding this comment

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

Interaction steps of campaigns that have already started are unable to be deleted, so I changed the test to use a campaign that hasn't started yet.

@crayolakat
Copy link
Author

This branch was previously approved and merged into the now inactive community-branches-qa branch, and has been successfully running on MoveOn's prod website for months.

Copy link

sonarcloud bot commented Feb 23, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
1.5% Duplication on New Code

See analysis details on SonarCloud

@crayolakat crayolakat merged commit 476f2ae into MoveOnOrg:main Feb 29, 2024
7 checks passed
@crayolakat crayolakat deleted the cascade_delete_interaction_step branch February 29, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants