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

Bug: Cannot delete interaction steps unless you delete the innermost questions and responses first #1673

Open
ibrand opened this issue Jul 9, 2020 · 5 comments · Fixed by #2244 or MoveOnOrg/Spoke#10
Assignees
Labels
A-Admin UI/UX Area: Admin experience of using Spoke C-bug Type: Bug help wanted S-in progress Status: Issue label for once a contributor has picked it up. Especially meant for Good First Issues.

Comments

@ibrand
Copy link
Collaborator

ibrand commented Jul 9, 2020

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. Go to the campaign edit page for a campaign that already has an interaction tree
  2. Click on interaction steps
  3. Try to delete any interaction steps that have nested responses and questions
  4. See error:
Error: GraphQL error: delete from "interaction_step" where "id" = $1 - update or delete on table "interaction_step" violates foreign key constraint "interaction_step_parent_interaction_id_foreign" on table "interaction_step"

Expected behavior
We should be able to delete interaction steps from any part of the tree.

Platform (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Desktop
  • Version v7.0
    We have also seen this behavior reproduced on a Linux machine
@ibrand ibrand added C-bug Type: Bug help wanted A-Admin UI/UX Area: Admin experience of using Spoke labels Jul 9, 2020
@deepakvenkat
Copy link

I am working on this issue.

@ibrand
Copy link
Collaborator Author

ibrand commented Aug 25, 2020

Hey @deepakvenkat did you end up making any progress on this?

@ibrand ibrand added the S-in progress Status: Issue label for once a contributor has picked it up. Especially meant for Good First Issues. label Aug 25, 2020
@rossdakin
Copy link

Bump.

@rossdakin
Copy link

Including our log, to make the bug slightly more searchable:

2021-03-05T01:21:24.676996+00:00 app[web.1]: backend error { userId: 4,
2021-03-05T01:21:24.677005+00:00 app[web.1]: code: '23503',
2021-03-05T01:21:24.677005+00:00 app[web.1]: error:
2021-03-05T01:21:24.677009+00:00 app[web.1]: { error: delete from "interaction_step" where "id" = $1 - update or delete on table "interaction_step" violates foreign key constraint "interaction_step_parent_interaction_id_foreign" on table "interaction_step"
2021-03-05T01:21:24.677010+00:00 app[web.1]: at Parser.parseErrorMessage (/spoke/node_modules/pg-protocol/dist/parser.js:278:15)
2021-03-05T01:21:24.677010+00:00 app[web.1]: at Parser.handlePacket (/spoke/node_modules/pg-protocol/dist/parser.js:126:29)
2021-03-05T01:21:24.677011+00:00 app[web.1]: at Parser.parse (/spoke/node_modules/pg-protocol/dist/parser.js:39:38)
2021-03-05T01:21:24.677011+00:00 app[web.1]: at TLSSocket.stream.on (/spoke/node_modules/pg-protocol/dist/index.js:10:42)
2021-03-05T01:21:24.677012+00:00 app[web.1]: at TLSSocket.emit (events.js:189:13)
2021-03-05T01:21:24.677012+00:00 app[web.1]: at TLSSocket.EventEmitter.emit (domain.js:441:20)
2021-03-05T01:21:24.677013+00:00 app[web.1]: at addChunk (_stream_readable.js:284:12)
2021-03-05T01:21:24.677013+00:00 app[web.1]: at readableAddChunk (_stream_readable.js:265:11)
2021-03-05T01:21:24.677013+00:00 app[web.1]: at TLSSocket.Readable.push (_stream_readable.js:220:10)
2021-03-05T01:21:24.677014+00:00 app[web.1]: at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2021-03-05T01:21:24.677014+00:00 app[web.1]: message:
2021-03-05T01:21:24.677015+00:00 app[web.1]: 'delete from "interaction_step" where "id" = $1 - update or delete on table "interaction_step" violates foreign key constraint "interaction_step_parent_interaction_id_foreign" on table "interaction_step"',
2021-03-05T01:21:24.677015+00:00 app[web.1]: locations: [ { line: 2, column: 3 } ],
2021-03-05T01:21:24.677015+00:00 app[web.1]: path: [ 'editCampaign' ] },
2021-03-05T01:21:24.677016+00:00 app[web.1]: msg: 'GraphQL error' }

@crayolakat
Copy link
Collaborator

Fix was never merged to main branch

@crayolakat crayolakat reopened this Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Admin UI/UX Area: Admin experience of using Spoke C-bug Type: Bug help wanted S-in progress Status: Issue label for once a contributor has picked it up. Especially meant for Good First Issues.
Projects
None yet
4 participants