Skip to content

feat(forms): clone dimensions when cloning a stand-alone survey - #1044

Merged
japsu merged 1 commit into
mainfrom
feat/survey-clone-dimensions
Sep 9, 2026
Merged

japsu merged 1 commit into
mainfrom
feat/survey-clone-dimensions

Conversation

@japsu

@japsu japsu commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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
japsu force-pushed the feat/survey-clone-dimensions branch from e1b36da to 3e264a2 Compare September 8, 2026 16:51
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
japsu force-pushed the feat/survey-clone-dimensions branch from 3e264a2 to 514c73c Compare September 9, 2026 19:29
@japsu
japsu merged commit 67af4b8 into main Sep 9, 2026
9 checks passed
@japsu
japsu deleted the feat/survey-clone-dimensions branch September 9, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant