View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
04259Bug reportsOtherpublic2010-04-11 00:40
Reporteruser7171Assigned Touser7171 
PrioritynormalSeverityminor 
Status closedResolutionopen 
Product Version1.90b 
Summary04259: Survey can't be saved if datestamp not enabled while creating a survey
Description

By default datestamp is a disabled option. If not selected the surveys were not being saved because the tables created for survey response didn't had a field
'submitdate' (which is mandatory for each survey result). I took out this field from the datestamp condition. So when a fieldMap is generated this field will be created irrespective of datestamp value, and hence successfully storing the survey results. Also this problem didn't allowed the user to see the list of surveys, which has been fixed now.

Steps To Reproduce

Just create a survey without Date stamp (Notifications and data management) set to No(which is default anyway). And then take a survey or try to view list survey option.

TagsNo tags attached.
Attached Files
datestamp_fix.patch (1,502 bytes)   
Index: common.php
===================================================================
--- common.php	(revision 8556)
+++ common.php	(working copy)
@@ -2255,8 +2255,15 @@
     }
 
     $counter=0;
+    $fieldmap[$counter]=array("fieldname"=>"submitdate", "type"=>"submitdate", "sid"=>$surveyid, "gid"=>"", "qid"=>"", "aid"=>"");
+	if ($style == "full")
+    {
+        $fieldmap[$counter]['title']="";
+        $fieldmap[$counter]['question']=$clang->gT("Date submitted");
+        $fieldmap[$counter]['group_name']="";
+    }
+    $counter++;
 
-
     $fieldmap[$counter]=array("fieldname"=>"id", "sid"=>$surveyid, "type"=>"id", "gid"=>"", "qid"=>"", "aid"=>"");
     if ($style == "full")
     {
@@ -2329,19 +2336,7 @@
                 $fieldmap[$counter]['group_name']="";
             }
             $counter++;
-            $fieldmap[$counter]=array("fieldname"=>"submitdate",
-                                     "type"=>"submitdate", 
-                                     "sid"=>$surveyid, 
-                                     "gid"=>"", 
-                                     "qid"=>"", 
-                                     "aid"=>"");
-            if ($style == "full")
-            {
-                $fieldmap[$counter]['title']="";
-                $fieldmap[$counter]['question']=$clang->gT("Date submitted");
-                $fieldmap[$counter]['group_name']="";
-            }
-            $counter++;
+            
         }
         if ($prow['ipaddr'] == "Y")
         {
datestamp_fix.patch (1,502 bytes)   
Bug heat0
Complete LimeSurvey version number (& build)8556
I will donate to the project if issue is resolved
BrowserFirefox
Database type & versionMysql 5.1.37
Server OS (if known)Ubuntu
Webserver software & version (if known)Apache
PHP Version5.2.10

Users monitoring this issue

There are no users monitoring this issue.

Activities

Issue History

Date Modified Username Field Change
2010-04-04 01:09 user7171 New Issue
2010-04-04 01:09 user7171 Status new => assigned
2010-04-04 01:09 user7171 Assigned To => user7171
2010-04-04 01:09 user7171 File Added: datestamp_fix.patch
2010-04-04 01:12 user7171 Description Updated
2010-04-04 09:25 user7171 Status assigned => resolved
2010-04-11 00:40 c_schmitz Status resolved => closed
2010-10-25 00:18 c_schmitz Category Survey Taking => (No Category)