View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
18060 | Bug reports | Survey editing | public | 2022-04-28 12:45 | 2022-05-30 11:14 |
Reporter | c_schmitz | Assigned To | gabrieljenik | ||
Priority | urgent | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 5.3.x | ||||
Summary | 18060: 'Save as default values' question setting not working properly | ||||
Description | When using the option "Save as default values" it is not working for the most part. | ||||
Steps To Reproduce | Steps to reproduceCreate a text question, set it to mandatory, change some other advanced question attributes, activate 'Save as default values' and save. Then create a new question of the same type. Expected resultAfter saving, the switch 'Save as default values' should automatically revert to 'off' again. Actual resultThe switch 'Save as default values' stays on after save. | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 5.3.11 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | n/a | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 7.4 | ||||
related to | 16734 | closed | c_schmitz | Feature requests | mandatory default N and same_default default 1 |
related to | 15982 | assigned | p_teichmann | Bug reports | Default attribute are saved in DB |
Something to check: Are the question type defaults user specific (they should) or global (god, please no). |
|
inherited by survey/group/global :D |
|
lol, I hope that was a joke ;) |
|
https://github.com/LimeSurvey/LimeSurvey/pull/2386 The value of the front_end switch depended on use_defaults, which has nothing to do with it. Now it always appears disabled, as this a one way switch: You can only set it to true and then defaults will be snapshot and saved. There is no link in between the default values sanpshot and the current question attributes. Question attributes can later be changed, and the default wouldn't be impacted. Defaults were saved but not used for populating new questions. Now they do. |
|
Tbh,. I am not sure how the default values are applied on a new question, because the question type is only select after the `default are already loaded |
|
I think you have a good argument there. |
|
+1 here Else : the best place seems to be in QuestionAttribute or QuestionAttributeHelper ? |
|
QuestionAttributeFetcher does the following:
In populateValues(), if the question is new (has no QID) it raises the default values. That is kind the behaviour it used to have. Haven't changed it. Just fixed what was not working correctly. I am not sure it is great feature. :) |
|
But : Save 'placeholder' "enter a number" default value for numeric |
|
Hmm If I got it right, no, it must not. |
|
It's not like that i understand the default value by question type :) It's more clear with
Short text didn't have placeholder too . If short text have it with already saved : yes , must not update. @c_schmitz : do you have any specifications for this feature ? |
|
OK, how these defaults are applied was not specifically in the scope of this ticket. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=33530 |
|
Fixed in Release 5.3.18+220530 |
|
LimeSurvey: master f9a58ce3 2022-05-25 16:25 Committer: GitHub Details Diff |
Fixed issue 18060: 'Save as default values' question setting not working properly (#2386) |
Affected Issues 18060 |
|
mod - application/extensions/GeneralOptionWidget/settings/SaveAsDefaultGeneralOption.php | Diff File | ||
mod - application/models/services/QuestionAttributeFetcher.php | Diff File | ||
mod - application/models/services/QuestionAttributeHelper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-28 12:45 | c_schmitz | New Issue | |
2022-04-28 12:46 | c_schmitz | Note Added: 69284 | |
2022-04-28 12:46 | c_schmitz | Bug heat | 0 => 2 |
2022-04-28 12:47 | c_schmitz | Relationship added | related to 16734 |
2022-04-28 12:48 | c_schmitz | Assigned To | => gabrieljenik |
2022-04-28 12:48 | c_schmitz | Priority | none => urgent |
2022-04-28 12:48 | c_schmitz | Status | new => assigned |
2022-04-28 13:13 | DenisChenu | Note Added: 69286 | |
2022-04-28 13:13 | DenisChenu | Bug heat | 2 => 4 |
2022-04-28 14:44 | c_schmitz | Note Added: 69287 | |
2022-04-28 15:27 | DenisChenu | Relationship added | related to 15982 |
2022-05-02 21:03 | gabrieljenik | Note Added: 69357 | |
2022-05-02 21:03 | gabrieljenik | Bug heat | 4 => 6 |
2022-05-02 21:04 | gabrieljenik | Status | assigned => ready for testing |
2022-05-19 20:14 | c_schmitz | Note Added: 69877 | |
2022-05-19 20:15 | c_schmitz | Status | ready for testing => feedback |
2022-05-19 21:22 | gabrieljenik | Note Added: 69887 | |
2022-05-20 08:22 | DenisChenu | Note Added: 69891 | |
2022-05-20 14:17 | gabrieljenik | Note Added: 69910 | |
2022-05-20 14:31 | DenisChenu | Note Added: 69911 | |
2022-05-20 15:42 | gabrieljenik | Note Added: 69914 | |
2022-05-20 16:00 | DenisChenu | Note Added: 69917 | |
2022-05-20 16:06 | gabrieljenik | Note Added: 69919 | |
2022-05-25 14:25 | gabrieljenik | Changeset attached | => LimeSurvey master f9a58ce3 |
2022-05-25 14:25 | gabrieljenik | Note Added: 70038 | |
2022-05-25 14:25 | gabrieljenik | Resolution | open => fixed |
2022-05-25 14:25 | c_schmitz | Status | feedback => resolved |
2022-05-30 11:14 | LimeBot | Note Added: 70096 | |
2022-05-30 11:14 | LimeBot | Status | resolved => closed |
2022-05-30 11:14 | LimeBot | Bug heat | 6 => 8 |