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

Allow to correct answers in the same questionnaire #1490

Open
bswck opened this issue Jan 23, 2024 · 4 comments
Open

Allow to correct answers in the same questionnaire #1490

bswck opened this issue Jan 23, 2024 · 4 comments
Labels
enhancement help wanted The issue is valid, but we need community contributions to fix it

Comments

@bswck
Copy link

bswck commented Jan 23, 2024

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.

@pawamoy
Copy link
Contributor

pawamoy commented Jan 23, 2024

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

@bswck
Copy link
Author

bswck commented Jan 23, 2024

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

@yajo
Copy link
Member

yajo commented Jan 24, 2024

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 yajo added this to the Community contribution milestone Jan 24, 2024
@yajo yajo added the help wanted The issue is valid, but we need community contributions to fix it label Jan 24, 2024
@nathanjmcdougall
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted The issue is valid, but we need community contributions to fix it
Projects
None yet
Development

No branches or pull requests

4 participants