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

Copy/Duplicate Component creates additional_answers in the source component if they exist #524

Closed
rlakey opened this issue Jan 25, 2023 · 0 comments · Fixed by #525
Closed
Labels
bug Something isn't working

Comments

@rlakey
Copy link
Contributor

rlakey commented Jan 25, 2023

When running a component copy or duplicate workflow if the source component has additional questions and answers defined on controls they are correctly carried over to the new component as new questions and answers but new answers are added to the original questions for the new rules.

This causes an issue when the source component is deleted the new component contains audit records that are referencing the old question/answer and review history will not load.

If include_association :additional_answers below is commented out of the rule model the operation happens as expected with no new answers added to the original questions.

  amoeba do
    # Using set review_requestor_id: nil does not work as expected, must use nullify
    nullify :review_requestor_id
    set locked: false

    include_association :additional_answers
  end```
@rlakey rlakey added the bug Something isn't working label Jan 25, 2023
@rlakey rlakey linked a pull request Jan 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant