View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
04188Bug reportsOtherpublic2010-03-17 01:16
Reporteruser6961Assigned Toharsha  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.87+ 
Fixed in Version1.87+ 
Summary04188: Edit Response - Data Entry - Not working
Description

Here is my situation:

  • Respondents make errors in their responses.
  • I go to edit the response -> Data enty
  • I have 2 optional questions - type "Date" and type "Array (Multi Flexible) (Numbers)" (attached for reference)
  • When I edit the response and save the above 2 questions if not answered get automatically filled with data and break the integrity of the answers
  • The "Date" type question gets a 1999 as an year - well outside of the range defined in the question options. Also the question doesn't appear as as date dropdowns as defined in the question advanced settings.
  • The "Array (Multi Flexible) (Numbers)" fields get automatically filled with the "minimum value" as defined in the question advanced settings. The worst thing is that there is no way to manully change the answer back to NULL.
  • Therefore every response edit results in wrong data being entered - which makes this feature unusable for me.
TagsNo tags attached.
Attached Files
DataEntry.patch (1,364 bytes)   
Index: admin/dataentry.php
===================================================================
--- admin/dataentry.php	(revision 8487)
+++ admin/dataentry.php	(working copy)
@@ -254,7 +254,13 @@
 						else
 						{
 							$col_name .= db_quote_id($fieldname).", \n";
-							$insertqr .= "'" . auto_escape($_POST[$fieldname]) . "', \n";
+							$fieldValue = $_POST[$fieldname];
+							//$insertqr .= "'" . auto_escape($_POST[$fieldname]) . "', \n";
+							if($irow['type'] == 'D'){
+								$datetimeobj = new Date_Time_Converter($_POST[$fieldname],$dateformatdetails['phpdate']);
+								$fieldValue  = $datetimeobj->convert("Y-m-d H:i:s");
+							}
+							$insertqr .= "'" . auto_escape($fieldValue) . "', \n";
 						}
 					}
 					// if "!" "L" "W" "Z", and Other ==> add other fieldname
@@ -2152,7 +2158,9 @@
 					$dataentryoutput .= "\t</select>\n";
 					break;
 					case "D": //DATE
-					$dataentryoutput .= "\t<input type='text' name='$fieldname' size='10' />\n";
+					$datetimeobj = new Date_Time_Converter('', "Y-m-d H:i:s");
+                    $thisdate=$datetimeobj->convert($dateformatdetails['phpdate']);                 
+					$dataentryoutput .= "\t<input type='text' class='popupdate' size='12' name='$fieldname'/>\n";
 					break;
 					case "G": //GENDER drop-down list
 					$dataentryoutput .= "\t<select name='$fieldname'>\n"
DataEntry.patch (1,364 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)8429
I will donate to the project if issue is resolved
BrowserIE8 or Opera
Database type & versionMySQL 5.0.85
Server OS (if known)Apache/2.2.14 (Unix)
Webserver software & version (if known)Apache/2.2.14 (Unix)
PHP VersionPHP Version 5.2.12

Relationships

related to 04067 closedjcleeland No answer is not possible for list question 
related to 04206 closedharsha Array (Multi Flexible) (Numbers) - Not work correctly 

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2010-03-10 10:43

updater   ~11276

harsha, can you update your local version to the latest release from SVN (because there was a fix to a similar problem recently: http://bugs.limesurvey.org/view.php?id=4178) and test if you can reproduce the problem.

If so maybe you can check what might be wrong at /admin/dataentry.php.

harsha

harsha

2010-03-14 03:11

reporter   ~11341

Thanks for the information Mazy , i am looking at it.

harsha

harsha

2010-03-14 07:37

reporter   ~11342

Yes the issue is yet there , even though the user does not specify values while editing Date type and Array (Multi Flexible) (Numbers) type questions the values get assigned. Thanks iboguev for reporting this. I am working on it.

harsha

harsha

2010-03-15 11:52

reporter   ~11345

I am halfway through this issue , i managed to made date type questions appear as date dropdowns as defined in the question advanced settings and removed default date values which get assigned by default as iboguev mentioned.

What would be the better date range to populate in date dropdowns ? it defaults to 2000-2020

Mazi

Mazi

2010-03-15 12:35

updater   ~11346

I think "this_year" + / - 10 years is fine. The min/max range can also be set by using question attributes so please check that the code considerwes these attribute: http://docs.limesurvey.org/tiki-index.php?page=Question+attributes&amp;structure=English+Instructions+for+LimeSurvey#dropdown_dates

Thanks for your work!

harsha

harsha

2010-03-15 22:03

reporter   ~11371

i sorted the issue for Date type questions. Have a look and let me know for any issues. Then i ll commit to the trunk.

c_schmitz

c_schmitz

2010-03-15 22:52

administrator   ~11376

Looks alright, thank you.
Please commit!

harsha

harsha

2010-03-16 20:08

reporter   ~11397

I committed all the changes, if there is any problem let me know. I guess now it is sorted iboguev problems.

c_schmitz

c_schmitz

2010-03-17 00:12

administrator   ~11399

Please set it to resolved then.

jcleeland

jcleeland

2010-03-17 01:16

reporter   ~11402

Fixed by harsha in rev 8491

Issue History

Date Modified Username Field Change
2010-03-09 14:49 user6961 New Issue
2010-03-09 14:49 user6961 File Added: limesurvey_question_Array (Multi Flexible) (Numbers).csv
2010-03-09 14:58 mdekker Relationship added related to 04067
2010-03-10 10:41 Mazi Status new => assigned
2010-03-10 10:41 Mazi Assigned To => harsha
2010-03-10 10:43 Mazi Note Added: 11276
2010-03-14 03:11 harsha Note Added: 11341
2010-03-14 07:37 harsha Note Added: 11342
2010-03-15 11:52 harsha Note Added: 11345
2010-03-15 12:35 Mazi Note Added: 11346
2010-03-15 21:59 harsha File Added: DataEntry.patch
2010-03-15 22:03 harsha Note Added: 11371
2010-03-15 22:52 c_schmitz Note Added: 11376
2010-03-16 20:08 harsha Note Added: 11397
2010-03-17 00:12 c_schmitz Note Added: 11399
2010-03-17 01:16 jcleeland Note Added: 11402
2010-03-17 01:16 jcleeland Status assigned => closed
2010-03-17 01:16 jcleeland Resolution open => fixed
2010-03-17 01:16 jcleeland Fixed in Version => 1.87+
2010-03-17 18:01 harsha Relationship added related to 04206
2010-05-06 10:26 c_schmitz Category Data entry (non-public) => (No Category)