copier icon indicating copy to clipboard operation
copier copied to clipboard

Allow to correct answers in the same questionnaire

Open johnslavik opened this issue 1 year ago • 6 comments

Actual Situation

Assuming I make a mistake when answering the last question, I have to Ctrl+C and answer everything again.

Desired Situation

I can press Ctrl+Z to get back to previous question and correct it.

Proposed solution

I'll let you know when I have a concrete idea worth sharing.

johnslavik avatar Jan 23 '24 13:01 johnslavik

You can also finish the first generation, commit everything, then run copier update, change your answer for this question and amend the previous commit.

pawamoy avatar Jan 23 '24 13:01 pawamoy

You can also finish the first generation, commit everything, then run copier update, change your answer for this question and amend the previous commit.

While this is a working idea, it will not recreate dynamic "look-behind" defaults. For instance, if an answer foo has a default of {{previous_answer}}, then in copier update it's not re-rendered from the newly answered previous_answer value, but the old foo value is used. This might be quite inconvenient in questionnaires where there are quite a few questions defaults of which depend on the previous ones (which is my case).

johnslavik avatar Jan 23 '24 14:01 johnslavik

FWIW Ctrl+z don't seem a good key combination because it's commonly used for sending processes to background while using a terminal.

However, the rest of the feature request is valid anyways.

yajo avatar Jan 24 '24 18:01 yajo

You can also finish the first generation, commit everything, then run copier update, change your answer for this question and amend the previous commit.

Another issue with this is if you have _tasks scripts to run after template instantiation, then it will run them using incorrect values first before getting a chance to change the response.

nathanjmcdougall avatar Mar 13 '24 00:03 nathanjmcdougall