View Issue Details

IDProjectCategoryView StatusLast Update
13548Bug reports[All Projects] Conditionspublic2018-06-27 15:29
ReporterjosepAssigned Todominikvitt 
PriorityhighSeveritymajor 
Status closedResolutionfixed 
Product Version3.3.x 
Target VersionFixed in Version3.12.x 
Summary13548: Import survey process fails sometimes with data conditions
Description

Import survey process fails when you use copy question feature and question have conditions.

I create a survey with 1 group and 4 questions.
First question "select" is used to set conditions over question, questioncopied and questionnotcopied.
I copy question to create questioncopied.
I create questionnotcopied and set same condition than question and questioncopied.
I export survey and create new survey importing it.

As you can see (at attachments) questioncopied conditions are imported with errors while original survey has no errors.

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.5.4+180320
I will donate to the project if issue is resolvedNo
BrowserFirefox ESR 52.7.2 (64 bits
Database & DB-Versionpostgresql-9.6 9.6.6-0+deb9u1
Server OS (if known)GNU Linux Debian 9.3
Webserver software & version (if known)apache2 2.4.25-3+deb9u3
PHP Versionphp7.0 7.0.27-0+deb9u1

Relationships

has duplicate 13571 closeddominikvitt Import question with relevance equitation - relevance equitation not matching 

Activities

josep

josep

2018-03-28 14:13

reporter  

survey_logic_file-imported.html (17,072 bytes)
survey_logic_file-orig.html (16,657 bytes)
limesurvey_survey_947478(1).lss (15,439 bytes)
josep

josep

2018-03-28 14:32

reporter   ~47265

I review *.lss and I think error is that condition xml entry in <conditions>... is missing.

Thank's in advance.

<conditions>
<fields>
<fieldname>cid</fieldname>
<fieldname>qid</fieldname>
<fieldname>cqid</fieldname>
<fieldname>cfieldname</fieldname>
<fieldname>method</fieldname>
<fieldname>value</fieldname>
<fieldname>scenario</fieldname>
</fields>
<rows>
<row>
<cid><![CDATA[260]]></cid>
<qid><![CDATA[523]]></qid>
<cqid><![CDATA[522]]></cqid>
<cfieldname><![CDATA[947478X127X522]]></cfieldname>
<method><![CDATA[==]]></method>
<value><![CDATA[Y]]></value>
<scenario><![CDATA[1]]></scenario>
</row>
<row>
<cid><![CDATA[262]]></cid>
<qid><![CDATA[528]]></qid>
<cqid><![CDATA[522]]></cqid>
<cfieldname><![CDATA[947478X127X522]]></cfieldname>
<method><![CDATA[==]]></method>
<value><![CDATA[Y]]></value>
<scenario><![CDATA[1]]></scenario>
</row>
</rows>
</conditions>

josep

josep

2018-03-28 14:38

reporter   ~47266

Good news!

I manually added this block of XML to *.lss and I can import survey without any error.

<row>
<cid><![CDATA[261]]></cid>
<qid><![CDATA[524]]></qid>
<cqid><![CDATA[522]]></cqid>
<cfieldname><![CDATA[947478X127X522]]></cfieldname>
<method><![CDATA[==]]></method>
<value><![CDATA[Y]]></value>
<scenario><![CDATA[1]]></scenario>
</row>

Then, perhaps, bug is in copy feature.

josep

josep

2018-03-28 14:59

reporter   ~47267

Process fails not only copying questions: exporting and importing question make survey importation process with bugs too.

LouisGac

LouisGac

2018-05-16 13:16

manager   ~47637

thank you very much for that detailed bugs report.
we'll try to fix it asap

dominikvitt

dominikvitt

2018-06-21 17:30

developer   ~48270

Did a few more tests.
Problem is still present when question relevance equation contains variable names like this ((475493X17X55.NAOK == "Y")).
After the import, equation variable name from old survey isn't converted to equation variable name of new survey, instead it stay the same.
Then survey logic of new survey show error(s).

LouisGac

LouisGac

2018-06-26 14:09

manager   ~48295

Denis:

Dominik found that reverting this commit fix this bug:
https://github.com/LimeSurvey/LimeSurvey/commit/3e2ade21e2127e3bc869ec7b2e22a1b24c277599

but we're not sure we can revert it.
can you have a look please?

guest

guest

2018-06-26 16:08

viewer   ~48298

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=27536

dominikvitt

dominikvitt

2018-06-26 16:14

developer   ~48299

Issue is fixed.

c_schmitz

c_schmitz

2018-06-27 15:29

administrator   ~48330

Version 3.12.3+180627 released

Related Changesets

LimeSurvey: master 60284888

2018-06-26 16:08:31

Dominik Vitt

Details Diff
Fixed issue 13548: Import survey process fails sometimes with data conditions Affected Issues
13548
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/common_helper.php Diff File

Issue History

Date Modified Username Field Change
2018-03-28 14:13 josep New Issue
2018-03-28 14:13 josep File Added: survey_logic_file-imported.html
2018-03-28 14:13 josep File Added: survey_logic_file-orig.html
2018-03-28 14:13 josep File Added: limesurvey_survey_947478(1).lss
2018-03-28 14:32 josep Note Added: 47265
2018-03-28 14:38 josep Note Added: 47266
2018-03-28 14:59 josep Note Added: 47267
2018-05-16 13:13 LouisGac Assigned To => LouisGac
2018-05-16 13:13 LouisGac Status new => assigned
2018-05-16 13:16 LouisGac Note Added: 47637
2018-05-16 13:35 LouisGac Relationship added has duplicate 13571
2018-05-23 13:04 LouisGac Priority none => high
2018-06-18 13:30 LouisGac Assigned To LouisGac => dominikvitt
2018-06-20 17:27 dominikvitt Status assigned => confirmed
2018-06-21 17:30 dominikvitt Note Added: 48270
2018-06-26 14:08 LouisGac Assigned To dominikvitt => DenisChenu
2018-06-26 14:09 LouisGac Note Added: 48295
2018-06-26 16:08 Changeset attached => LimeSurvey master 60284888
2018-06-26 16:08 guest Note Added: 48298
2018-06-26 16:08 guest Resolution open => fixed
2018-06-26 16:14 dominikvitt Assigned To DenisChenu => dominikvitt
2018-06-26 16:14 dominikvitt Status confirmed => resolved
2018-06-26 16:14 dominikvitt Fixed in Version => 3.12.x
2018-06-26 16:14 dominikvitt Note Added: 48299
2018-06-27 15:29 c_schmitz Note Added: 48330
2018-06-27 15:29 c_schmitz Status resolved => closed