View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
03557Bug reportsSurvey takingpublic2009-08-12 20:57
Reporteruser4531Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.85+ 
Summary03557: lime_saved_control srid not unique over multiple surveys, saved answers get deleted
Description

The field srid in table lime_saved_control is identical to the field id in individual lime_survey_xxx tables.
If you have multiple running surveys with the option to save incomplete answers turned on, the same srid can be used in more than one lime_survey_xxx table at the same time which leads to deleted entries and thus inaccessible saved answers for incomplete surveys in lime_saved_control.

This happens with build 7435 and older 1.85(+) versions

Additional Information

E.g.: Two running surveys with the ids 1 and 2. User A answeres some questions from surevey 1 then saves them without completing all answers. One of the answers of user A gets the id 5 in table lime_survey_1 and an entry with srid 5 in lime_saved_control.
User B answers survey 2. One of his answers gets the id 5 in table lime_survey_2! He finishes all questions. Now entries with srid 5 get deleted from table lime_saved_control without checking the survey_id or anything else! User A cannot access his saved answers anymore.

This is a fatal loss of data if you have many big surveys and many users saving answers before finishing a survey.

TagsNo tags attached.
Attached Files
save.php (25,835 bytes)
Bug heat2
Complete LimeSurvey version number (& build)7435
I will donate to the project if issue is resolved
Browser
Database type & versionMySQL 5.0.51a
Server OS (if known)Debian GNU / Linux Lenny
Webserver software & version (if known)Apache 2.2
PHP Version5.2.6

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2009-08-12 16:40

administrator   ~09111

I attached a fixed file.
Thank you for reporting this!

Issue History

Date Modified Username Field Change
2009-08-12 14:22 user4531 New Issue
2009-08-12 14:22 user4531 Status new => assigned
2009-08-12 14:22 user4531 Assigned To => user372
2009-08-12 14:22 user4531 Build Number => 7435
2009-08-12 14:22 user4531 Database & DB-Version => MySQL 5.0.51a
2009-08-12 14:22 user4531 Operating System (Server) => Debian GNU / Linux Lenny
2009-08-12 14:22 user4531 Webserver => Apache 2.2
2009-08-12 14:22 user4531 PHP Version => 5.2.6
2009-08-12 14:23 user4531 Issue Monitored: user4531
2009-08-12 15:35 user372 Assigned To user372 => c_schmitz
2009-08-12 16:40 c_schmitz Note Added: 09111
2009-08-12 16:40 c_schmitz Status assigned => resolved
2009-08-12 16:40 c_schmitz Resolution open => fixed
2009-08-12 16:40 c_schmitz File Added: save.php
2009-08-12 20:57 c_schmitz Status resolved => closed
2009-08-13 08:59 user4531 Issue End Monitor: user4531
2010-10-25 00:18 c_schmitz Category Survey at Runtime => Survey taking