View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17169 | Bug reports | Plugins | public | 2021-03-09 15:34 | 2021-03-10 07:59 |
Reporter | Mazi | Assigned To | c_schmitz | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | won't fix | ||
Product Version | 3.25.17 | ||||
Summary | 17169: QuestionAttribute::model()->findByAttributes() only returns DB values which does NOT include default values | ||||
Description | This code should return the assessment value set at the "logic" section of a multi choice question: If works fine if you set the value to 2 or 5 or 10 or whatever. | ||||
Steps To Reproduce | Use the above code for a given multi choice question and check the return value. | ||||
Additional Information | See Discord chat from 2021-03-09 15:30h Mazi: | ||||
Tags | No tags attached. | ||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | Version 3.25.17+210309 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Chrome | ||||
Database type & version | MySQL 5 | ||||
Server OS (if known) | Ubuntu 18 | ||||
Webserver software & version (if known) | Apache | ||||
PHP Version | 7.3 | ||||
related to | 16669 | closed | gabrieljenik | Bug reports | getQuestionAttributes function don't get the plugins attribute |
related to | 14228 | confirmed | Feature requests | Survey and Question Theme need more information | |
related to | 14248 | acknowledged | Feature requests | Allow survey theme to add (and use) question attribute |
It sounds wise to save the default value in the responses table. And not construct the data. If the code changes, the default value might change. To be sure about what value was chosen when the survey was conducted save the default value to the database. The additional storage is not wasted. You don't want to have the return of no data as an proxy for default data. That sounds like begging for issues in the long run. Keep it simple stupid. If storage is an issue, LimeSurvey should start with the session size abuse ;-) |
|
yes : it's the definition … https://www.yiiframework.com/doc/api/1.1/CActiveRecord#findByAttributes-detail If need a getQuestionAttribute near https://github.com/LimeSurvey/LimeSurvey/blob/12cd8e5a2ca9975a3a45a0b10ca0630344d55e7d/application/models/QuestionAttribute.php#L210 : good I already make a feature request near this : https://bugs.limesurvey.org/view.php?id=14228 or https://bugs.limesurvey.org/view.php?id=14248 some year ago.
It work like this for years , and we never have issue reported … but why not. It's the case (when you save question) in 4.X currentlyè Else : it make bigger lss size. To test :
|
|
My opinion :
Then :
|
|
Saving all the values in the database does not make sense either, because saving redundant values is also a bad idea. |
|
It's the case in 4.4, need to report ? With ls3_sample_survey_multilingual_fr_de_en_it lss file updated maybe ? |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-09 15:34 | Mazi | New Issue | |
2021-03-09 15:38 | ollehar | Severity | block => partial_block |
2021-03-09 15:38 | ollehar | Priority | none => normal |
2021-03-09 15:38 | jelo | Note Added: 62947 | |
2021-03-09 15:48 | DenisChenu | Note Added: 62948 | |
2021-03-09 16:18 | DenisChenu | Note Added: 62955 | |
2021-03-09 17:04 | Mazi | Relationship added | related to 16669 |
2021-03-09 21:05 | c_schmitz | Assigned To | => c_schmitz |
2021-03-09 21:05 | c_schmitz | Status | new => closed |
2021-03-09 21:05 | c_schmitz | Resolution | open => won't fix |
2021-03-09 21:05 | c_schmitz | Note Added: 62981 | |
2021-03-10 07:58 | DenisChenu | Relationship added | related to 14228 |
2021-03-10 07:58 | DenisChenu | Relationship added | related to 14248 |
2021-03-10 07:59 | DenisChenu | Note Added: 62984 |