-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix #10629 - Duplicating Surveys #9498
Conversation
Hi @SinergiaCRM, The fix looks good, there's just one change that would be ideal. When duplicating surveys it is preferred if the questions are always carried across even when they have answers, just the answers wouldn't. Thanks, |
44caa63
to
63ae28a
Compare
Hi @jack7anderson7, Yes, this was actually what we wanted to implement. Updated the main PR message and the code. 👍 |
Updated the code, there was a syntax error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix is working and should be merged I think. @jack7anderson7 could you take a look at this? :)
Hello @SinergiaCRM , would you be so kind to combine commits into one? Thank you in advance! Regards, |
6f8b55f
to
58d9f40
Compare
58d9f40
to
e5cea0e
Compare
Done! |
Hello @SinergiaCRM, great, many thanks! Please update your branch later on: Regards, |
|
Closes #8947
As the Issue mentions, there is a problem when duplicating Surveys. Basically, what goes wrong when duplicating:
Closes #10629
Having a WorkFlow and duplicating a survey or create also duplicated the questions, as the code was executed without any workflow verification. This was because:
Description
This PR fixes the Duplicate functionality for the Surveys module, as we understand it should work:
won'twill take/keep/duplicate the questionsorbut not the answers. And other new Questions can be added during the first edition after duplication.already_saved
which is used to verify that the method is not re-executed. Ifalready_saved
is set, it means that the method has already been executed and reprocessing of the questions is avoided.Motivation and Context
With this change, duplicating Surveys will be consistent.
How To Test This
1- Create a Survey
2- Add questions
3- Duplicate it.
4- Repeat adding answers to the survey.
4.1. Modify the survey itself, for example, change from draft to published status.
4.2. Calculate fields, for example, calculate the name.
Types of changes
Final checklist