View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
18699 | Bug reports | Other | public | 2023-03-23 14:35 | 2023-03-24 09:04 |
Reporter | gabrieljenik | Assigned To | |||
Priority | none | Severity | block | ||
Status | confirmed | Resolution | open | ||
Product Version | 5.6.x | ||||
Summary | 18699: LSActiveRecord::getMaxId() doesn't get refreshed when using from SurveyDynamic with multiple surveys on the same HTTP request | ||||
Description | Caught while reviewing 18655 GJ: The diema is this is only happening on these tests as the model is used with different surveyIds within the same HTTP request. This is not happening on real life. DC: Until we use in in Question::model and Survey::model in same call … A workaround was implemented here for being able to use the remote_control->export_responses. | ||||
Steps To Reproduce | Steps to reproduceUndo this change Make a script for RC for exporting rsposnes from survey A and then from survey B. Expected resultSurvey B responses will be exported. Actual resultNo survey B responses will be exported. | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 5.6.7 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MySQL | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 8.0 | ||||
I would go with: 1- Add a new optional parameter to getMaxId 2 - Create LSActiveRecord::refreshMetadata() (overload of CActiveRecord). |
|
DC said... a lot must be automatic. If not : it's unusuable For example, you can do
You must have the real $maxId at each time. And more |
|
DC Said A question : did we really need this one ? Maybe just delete this statci var I think it's best to optimize other request (and use static or cache) https://bugs.limesurvey.org/view.php?id=18473 |
|
Not so easy … ;) |
|
haha I was trying to port the conversation :) |
|
Draft broken test : https://github.com/LimeSurvey/LimeSurvey/pull/3006 I like to keep some statci var when multiple load too For example : wen you ask Options for Survey #1 in Group #1 : you ask option in Survey #1 + option on Group #1 + Global option , the n if you as after option in Survey #2 : i like to keep option on Group #1 + Global option Same for Template option (where you can have more than on Global option …) maxIds is a good test for all of this ;) |
|
Is it ok if I take this? |
|
I think i get it I need to add same for minIds OK ? |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2023-03-23 14:35 | gabrieljenik | New Issue | |
2023-03-23 14:35 | gabrieljenik | Issue generated from: 18655 | |
2023-03-23 14:35 | gabrieljenik | Relationship added | related to 18655 |
2023-03-23 14:36 | gabrieljenik | Description Updated | |
2023-03-23 14:37 | gabrieljenik | Note Added: 74246 | |
2023-03-23 14:37 | gabrieljenik | Bug heat | 0 => 2 |
2023-03-23 14:38 | gabrieljenik | Note Added: 74247 | |
2023-03-23 14:38 | gabrieljenik | Note Added: 74248 | |
2023-03-23 14:53 | DenisChenu | Note Added: 74250 | |
2023-03-23 14:53 | DenisChenu | Bug heat | 2 => 4 |
2023-03-23 15:37 | gabrieljenik | Note Added: 74251 | |
2023-03-23 15:41 | DenisChenu | Note Added: 74252 | |
2023-03-23 21:59 | gabrieljenik | Note Added: 74259 | |
2023-03-23 22:00 | gabrieljenik | Status | new => confirmed |
2023-03-24 09:04 | DenisChenu | Note Added: 74270 |