View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
19778 | Bug reports | Other | public | 2024-09-27 11:34 | 2025-06-06 13:58 |
Reporter | DenisChenu | Assigned To | gabrieljenik | ||
Priority | none | Severity | minor | ||
Status | assigned | Resolution | open | ||
Product Version | 6.6.x | ||||
Summary | 19778: getIsDateStamp return false with date stamped survey | ||||
Description | In survey settings : if you have datestamp globally tpo N and survey datestamp to Y : getIsDateStamp return false | ||||
Steps To Reproduce | Steps to reproduceImport and activate included plugin Expected resultSee Survey getIsDateStamp are : true and Survey options->datestamp are : Y Actual resultSee Survey getIsDateStamp are : false and Survey options->datestamp are : N | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 6.6.5 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | not relevant | ||||
Database type & version | not relevant | ||||
Server OS (if known) | not relevant | ||||
Webserver software & version (if known) | not relevant | ||||
PHP Version | not relevant | ||||
PS : i really don't understand all this code … https://github.com/LimeSurvey/LimeSurvey/blob/78a2949a70c0f98bb53882ccfd21a7faa27501ca/application/models/SurveysGroupsettings.php#L311 We end by survey : https://github.com/LimeSurvey/LimeSurvey/blob/78a2949a70c0f98bb53882ccfd21a7faa27501ca/application/models/SurveysGroupsettings.php#L362 But we need to start by survey, and not end by … |
|
@tibor.pacalat : my solution here is a big rewrite of the system. |
|
I'm still unsure on the desired behavior … Opinion: Survey->datestamp must return Y/N or I ? |
|
@gabrieljenik : do you have an opinion here ? Plugin can need to read if settings are inherited or not In Survey settings part OK for
In Survey and all other controller : Survey->datestamp = Survey->options->datestamp |
|
Agree. That is the survey data field.
I guess you talk about oOptions.
Agree.
Not sure I follow that statement. Still, if the datestamp is Inherited, could end up |
|
It's the current situation : when you check Survey->datestamp in beforeSurveyPage or newExport for example : you get Survey->oOptions->datestamp . Updating this : we broke a lot of plugins ! Only update for beforeSurveySettings and newSurveySettings (seems the only situation where we have this issue) or when controller are SurveyAdministrationController The upadte was here : https://github.com/LimeSurvey/LimeSurvey/blob/ec5825c1ce2c5d953b1f634e2e57e837c9df2c12/application/controllers/SurveyAdministrationController.php#L1923 |
|
From what I read, I think the issue could be in 2 places maybe: 1) Inheritance Mechanism in SurveysGroupsettings::getInstance 2) The line you commented (https://github.com/LimeSurvey/LimeSurvey/blob/ec5825c1ce2c5d953b1f634e2e57e837c9df2c12/application/controllers/SurveyAdministrationController.php#L1923) maybe fecthing the instance from the cache and then setting the options for the instance in the cache, whereas in other places options should be set from inheritance. Will debug and be back |
|
This one is very strange .... |
|
I see several problems. 1) One of the problems is that the survey is cached. 2) Another problem is that, when using setOptionsFromDatabase(), you are using the same attribute and mixing inherited values with final values. setOptionsFromDatabase, which has a very confusing name, sets the value that would correspond to each option if inherited in oOptions (and oOptionsLabels and aOptions). This is basically done to be able to display in the UI which option would be inherited. I think things should be separate: The final value should always be in oOptions, and values that would be inherited if an attribute were "inherited" should have separate properties. Something like "parentOptions" and "parentOptionLabels." Then, should review all the places where oOptions (or others) are currently used, as we need to be sure whether we expect to use the inherited value or the final value. At last, we should also remove setOptionsFromDB() and review other places where that method is used, such as the bShowRealValues attribute. This includes APIs or tests. This is an initial branch, where we are starting to separate the use of oOptions: I look forward to your comments. |
|
Wow ! You make it really complex !!! I really don't like parentOptions : parent is group (and grand parent Global), then more clear name can be dbvalue ? Another idea is (for datestamp), where group is Y and survey is I
I think it's a really bad idea to touch to Survey->datestamp, Survey->options->datestamp and Survey->getIsDateStamp in all other page (for example in Survey Runtime)
Yep, I think we already have some report about remote control : no way to get DB value OR do not have current values. If the issue are no way to get DB value : it's great, because we fix issue without breaking API version. |
|
PS : when assign it to yoiu, it's not to be done by you, but to have advice. Since you start : i don't take it again |
|
I agree the name we set
I am not sure this will solve the real problem.
Not aiming to do so. The idea is to review those pieces of code and make sure they are using the expected value.
In those cases, a modelValues attribute could be usefull. @c_schmitz or someone else... any comment? Would like some input there before moving forward. Thanks |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2024-09-27 11:34 | DenisChenu | New Issue | |
2024-09-27 11:34 | DenisChenu | File Added: DateStampSettingsIssue.zip | |
2024-09-27 11:34 | DenisChenu | File Added: Capture d’écran du 2024-09-27 11-31-55.png | |
2024-09-27 11:36 | DenisChenu | Note Added: 81122 | |
2024-09-27 11:36 | DenisChenu | Bug heat | 0 => 2 |
2024-10-02 17:02 | tibor.pacalat | Assigned To | => DenisChenu |
2024-10-02 17:02 | tibor.pacalat | Status | new => assigned |
2024-10-07 11:00 | DenisChenu | Note Added: 81173 | |
2025-02-18 11:09 | DenisChenu | Note Added: 82058 | |
2025-05-22 11:06 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
2025-05-22 11:06 | DenisChenu | Status | assigned => feedback |
2025-05-22 11:06 | DenisChenu | Note Added: 82732 | |
2025-05-22 11:07 | DenisChenu | Note Edited: 82732 | |
2025-05-23 23:19 | gabrieljenik | Note Added: 82754 | |
2025-05-23 23:19 | gabrieljenik | Bug heat | 2 => 4 |
2025-05-26 08:44 | DenisChenu | Note Added: 82757 | |
2025-05-26 08:44 | DenisChenu | Status | feedback => assigned |
2025-05-27 15:43 | gabrieljenik | Note Added: 82774 | |
2025-05-27 15:48 | DenisChenu | Note Added: 82775 | |
2025-06-05 20:55 | gabrieljenik | Note Added: 82837 | |
2025-06-06 09:39 | DenisChenu | Note Added: 82840 | |
2025-06-06 09:39 | DenisChenu | Note Added: 82841 | |
2025-06-06 13:58 | gabrieljenik | Note Added: 82847 |