feat(forms): clone dimensions when cloning a stand-alone survey - #1044
Merged
Merged
Conversation
japsu
force-pushed
the
feat/survey-clone-dimensions
branch
from
September 8, 2026 16:51
e1b36da to
3e264a2
Compare
Survey.clone()'s docstring has long claimed dimensions were cloned alongside language versions, but no code ever did this (a TODO(#585) for it was left commented out and later dropped entirely) - a copy of a survey with dimension-linked fields got an empty Universe instead. Add Universe.clone() (via new DimensionDTO.from_dimension / DimensionValueDTO.from_dimension_value constructors) and call it from Survey.clone() for stand-alone (FORMS) surveys, giving the clone its own independent copy of the dimensions and values. Program forms keep using the target event's shared program Universe as before; no dimension cloning applies there. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
japsu
force-pushed
the
feat/survey-clone-dimensions
branch
from
September 9, 2026 19:29
3e264a2 to
514c73c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Survey.clone()'s docstring has long claimed dimensions were cloned
alongside language versions, but no code ever did this (a TODO(#585)
for it was left commented out and later dropped entirely) - a copy of a
survey with dimension-linked fields got an empty Universe instead.
Add Universe.clone() (via new DimensionDTO.from_dimension /
DimensionValueDTO.from_dimension_value constructors) and call it from
Survey.clone() for stand-alone (FORMS) surveys, giving the clone its own
independent copy of the dimensions and values. Program forms keep using
the target event's shared program Universe as before; no dimension
cloning applies there.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com