View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16230 | Bug reports | Expression Manager | public | 2020-05-05 17:06 | 2022-02-14 11:23 |
Reporter | DenisChenu | Assigned To | DenisChenu | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.2.2 | ||||
Summary | 16230: Reload survey (token answer persistence) don't really reload … | ||||
Description | When using Equation to set question (if empty) : https://manual.limesurvey.org/Expression_Manager#Using_Assignment_Operator | ||||
Steps To Reproduce | Import included survey, See screencast | ||||
Additional Information | 2.6lts and 3.22 have the same issue. Then : muts not "fix" for 4, but must document it ? | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 4.2.2 github | ||||
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 | 7 | ||||
Related to relevanceStatus : … |
|
Partial fix (muts be improved)
Then maybe a better solution are :
|
|
@DenisChenu will you like to create a pull request with the partial fix? I will create a task for the better solution you have mentioned and it will be picked up at a later stage |
|
By Partial fix : it's usage of the whole plugin … and clearly : this one is here for a lot of other things ;) |
|
We have been reviewing this and trying to reproduce it. Here are some thoughts.1) The response is completeley loaded from the database, that is, it is loaded with the data that had been previously completed. 2) When you advance to the first page (the one with the formula with the assignment) the expression is processed, which in this case is: DataSet = if (is_empty (DataSet.NAOK), 'prefilled', DataSet.NAOK) DataSet.NAOK only returns the value it raised from the database if DataSet.relevanceStatus == true. At that moment, relevanceStatus for DataSet is false, because that question has not been processed yet, so its relevanceStatus cannot be known. When starting a survey and uploading the questions, it is very difficult to know the relevance status it had at the end of the previous upload since those are calculated on the fly. That makes .NAOK accessors to return always empty. 3) If the assignment is done on the same page it works, as relevanceStatus becomes true. Suggested actions:
So far, I believe it does only if equation is set on the same page as in the question to be defaulted (and view mode is not question by question). So, either |
|
? I really don't see how some existing survey can not work without … Again : We already have a lot of issue with maxtstep !== real max step Why not
|
|
I feel more comfortable adding .raw then updating the rendering process. Just thkinking outloud, wouldn't it be just enough with: |
|
No the point is : when reloading you are never sure lastpage in response table are the max page. Then you need to save :
And you need to move to the maxpage before move to lastpage See :
It's really used like this and it work. I stop here : i already have the solution, i already answer multiple time on the how to fix the issue. |
|
Still, that's like a great update. ping @c_schmitz @ollehar for comments. |
|
Want to discuss on zoho but https://projects.limesurvey.org/portal/limesurvey#taskdetail/85781000000271009/85781000001007039/85781000001035097 seems deleted. |
|
@DenisChenu it is not deleted. I added you to task owner and you should be able to comment now. |
|
OK thanks :) |
|
I split this one in 2 part : one without updating DB Fixing if user don't use previous , using lastpage only for master. Fix can be apply if OK in 3.X Fixing if user use previous : adding an survey attribute and coiluln to keep current step (lastpage) and max step (maxpage) |
|
Sh! i made an error … set relevanceStatus to true by default work … |
|
@gabrieljenik : sorry, you're right … the only way is to fix the relevanceStatus point on a way or another … Some idea :
2 can be great in my opinion ? When this is fixed : i fix the maxPage in develop version. PS : for 2 : update the search here : https://github.com/LimeSurvey/LimeSurvey/blob/16d809ea6cddb2fb14f9fbec3da12e17cf513569/application/helpers/expressions/em_manager_helper.php#L8572-L8576 |
|
I need to get contexto into this again. @ollehar, what do you think? |
|
Maybe add defaultRelevanceStaus as a public variable too ? Then we can set it when JumpTo after reloading. I really like to have a clean way to fix it … really allow usage of "Using Assignment Operator" https://manual.limesurvey.org/Expression_Manager#Using_Assignment_Operator A lot of forum helper (Jelo, holch …) give this advice : {QCODE=if(is_empty(QCODE.NAOK),"Value",QCODE.NAOK)} on forum … |
|
I still need to get context. |
|
After a lot of thinking : I really think we need to set relevanceStatus of all variables before the current step But relevanceStatus is set on ProcessAllNeededRelevance https://github.com/LimeSurvey/LimeSurvey/blob/538e0706f17938b31631c4b76874020323da7afd/application/helpers/expressions/em_manager_helper.php#L4102 But this function
|
|
Go to each group and https://github.com/LimeSurvey/LimeSurvey/blob/538e0706f17938b31631c4b76874020323da7afd/application/helpers/expressions/em_manager_helper.php#L6743 StartProcessingGroup ? In a static function ReloadSurvey ? |
|
@galads : not done ,but set as done in project : https://projects.limesurvey.org/portal/limesurvey#taskdetail/85781000001335039/85781000001337011/85781000001035097 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=33165 |
|
Fixed in Release 5.2.14+220214 |
|
LimeSurvey: master dbe2055f 2022-02-10 13:59 Committer: GitHub Details Diff |
Fixed issue 16230: Reload survey (token answer persistence) don't really reload (#2211) * Fixed issue 16230: Reload survey (token answer persistence) don't really reload … Dev: LEMtokenResume with reload by token too Dev: set maxstep to totalstep if needed Dev: Create LimeExpressionManager::SetRelevanceTo to set relevance before JumpTo in case of reload Dev: When reload : initFirstStep function before all other: then move reloading part here. * Dev: remove some dev test … |
Affected Issues 16230 |
|
mod - application/helpers/SurveyRuntimeHelper.php | Diff File | ||
mod - application/helpers/expressions/em_manager_helper.php | Diff File | ||
mod - application/helpers/frontend_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-05-05 17:06 | DenisChenu | New Issue | |
2020-05-05 17:06 | DenisChenu | File Added: survey_archive_reloadAndSetIfEmpty.lsa | |
2020-05-05 17:06 | DenisChenu | File Added: Peek 05-05-2020 17-05.gif | |
2020-06-29 13:21 | DenisChenu | Note Added: 58540 | |
2021-06-23 08:52 | DenisChenu | Note Added: 65002 | |
2021-07-05 10:29 | galads | Assigned To | => galads |
2021-07-05 10:29 | galads | Status | new => ready for testing |
2021-07-08 12:13 | galads | Note Added: 65259 | |
2021-07-08 12:14 | galads | Assigned To | galads => DenisChenu |
2021-07-08 12:14 | galads | Status | ready for testing => assigned |
2021-07-08 12:18 | galads | Sync to Zoho Project | => |Yes| |
2021-07-19 08:59 | galads | Assigned To | DenisChenu => galads |
2021-07-19 08:59 | galads | Status | assigned => confirmed |
2021-07-19 09:29 | DenisChenu | Note Added: 65505 | |
2021-09-10 09:08 | galads | Assigned To | galads => gabrieljenik |
2021-09-10 09:08 | galads | Status | confirmed => assigned |
2021-09-20 15:05 | gabrieljenik | Note Added: 66528 | |
2021-09-20 15:05 | gabrieljenik | Bug heat | 4 => 6 |
2021-09-20 15:28 | DenisChenu | Note Added: 66531 | |
2021-09-20 23:50 | gabrieljenik | Note Added: 66547 | |
2021-09-20 23:51 | gabrieljenik | Note Edited: 66547 | |
2021-09-21 08:30 | DenisChenu | Note Added: 66549 | |
2021-09-21 14:38 | gabrieljenik | Note Added: 66572 | |
2021-09-27 08:45 | c_schmitz | Zoho Project Synchronization | Yes => |Yes| |
2021-09-27 08:45 | c_schmitz | Assigned To | gabrieljenik => DenisChenu |
2021-10-06 08:12 | DenisChenu | Note Added: 66761 | |
2021-10-06 11:50 | galads | Note Added: 66765 | |
2021-10-06 12:03 | DenisChenu | Note Added: 66768 | |
2021-10-19 08:20 | c_schmitz | Zoho Project Synchronization | Yes => |Yes| |
2022-01-05 18:11 | DenisChenu | Note Added: 67930 | |
2022-01-05 19:07 | DenisChenu | Note Added: 67931 | |
2022-01-06 08:09 | DenisChenu | Note Added: 67932 | |
2022-01-06 08:10 | DenisChenu | Note Edited: 67932 | |
2022-01-06 08:11 | DenisChenu | Note Edited: 67932 | |
2022-01-06 16:19 | gabrieljenik | Note Added: 67933 | |
2022-01-06 16:23 | DenisChenu | Note Added: 67934 | |
2022-01-06 16:29 | gabrieljenik | Note Added: 67935 | |
2022-01-11 08:10 | DenisChenu | Note Added: 67947 | |
2022-01-11 08:11 | DenisChenu | Note Added: 67948 | |
2022-01-14 19:34 | DenisChenu | Note Added: 68029 | |
2022-01-19 15:15 | DenisChenu | Assigned To | DenisChenu => galads |
2022-01-19 15:15 | DenisChenu | Status | assigned => ready for testing |
2022-01-19 15:15 | DenisChenu | Note Added: 68050 | |
2022-02-10 12:59 | DenisChenu | Changeset attached | => LimeSurvey master dbe2055f |
2022-02-10 12:59 | DenisChenu | Note Added: 68263 | |
2022-02-10 12:59 | DenisChenu | Assigned To | galads => DenisChenu |
2022-02-10 12:59 | DenisChenu | Resolution | open => fixed |
2022-02-14 11:23 | LimeBot | Zoho Project Synchronization | Yes => |Yes| |
2022-02-14 11:23 | LimeBot | Note Added: 68291 | |
2022-02-14 11:23 | LimeBot | Status | ready for testing => closed |
2022-02-14 11:23 | LimeBot | Bug heat | 6 => 8 |