View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
19899 | Bug reports | Survey editing | public | 2024-12-17 16:19 | 2025-01-07 08:13 |
Reporter | DenisChenu | Assigned To | gabrieljenik | ||
Priority | none | Severity | minor | ||
Status | assigned | Resolution | open | ||
Product Version | 6.6.x | ||||
Summary | 19899: Order of question when copying are bad | ||||
Description | When set order of question when copying : order are badly set | ||||
Steps To Reproduce | Steps to reproduceGet a survey Expected resultNew question are after 1st question Actual resultNew question after 2nd question (but sometimes it's OK) | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 6.8.2 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | not relevant | ||||
Database type & version | mariadb | ||||
Server OS (if known) | debian | ||||
Webserver software & version (if known) | nginx | ||||
PHP Version | 8.3.14 | ||||
related to | 19900 | new | Unable to set position (in group) of new question |
@gabrieljenik But i think it must be in https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/services/CopyQuestion.php |
|
So before inserting the new question we may need to update the positions of certain questions. I don't incline to do it in the CopyQuestion service, as to try to keep the service objective clear and narrow. In fact, if talking about updating the service, I think there are things that would be good to correct in the service. For example, it would be good if instead of making queries like \Question::model()->findAllByAttributes(['parent_qid' => $parentId]); you could use the relationships of $this->copyQuestionValues->getQuestiontoCopy(). This way it is limited to what you are passing as parameters. |
|
Order are related to CopyQuestion (and Create question too, see related : 19900: Unable to set position (in group) of new question). If you think we can keep it in Question::increaseAllOrderNumbersForGroup : i can apply same fix for master. |
|
PS : i think we don't need a CopyQuestion service, or better : we need a lighter CopyQuestion using a NewQuestion service |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2024-12-17 16:19 | DenisChenu | New Issue | |
2024-12-17 16:19 | DenisChenu | File Added: Capture vidéo du 2024-12-17 16-16-47.webm | |
2024-12-19 11:38 | tibor.pacalat | Assigned To | => gabrieljenik |
2024-12-19 11:38 | tibor.pacalat | Status | new => assigned |
2024-12-19 12:09 | DenisChenu | Note Added: 81664 | |
2024-12-19 12:09 | DenisChenu | Bug heat | 0 => 2 |
2024-12-19 12:09 | DenisChenu | Note Edited: 81664 | |
2025-01-06 17:22 | gabrieljenik | Note Added: 81745 | |
2025-01-06 17:22 | gabrieljenik | Bug heat | 2 => 4 |
2025-01-07 08:11 | DenisChenu | Relationship added | related to 19900 |
2025-01-07 08:12 | DenisChenu | Note Added: 81746 | |
2025-01-07 08:13 | DenisChenu | Note Added: 81747 |