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```
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.