View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
17688Bug reportsQuestion editorpublic2022-01-05 09:37
Reportergabrieljenik Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version5.x 
Summary17688: When importing a group with question with default value, default values are not imported
Description

Identified while reviewing 17511.

When debug is on, a cash happens.

TagsNo tags attached.
Attached Files
image.png (72,607 bytes)   
image.png (72,607 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)5.x
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Versionphp

Relationships

related to 17511 closedgabrieljenik When importing a group, duplicate question codes can be generated 

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2021-10-27 15:19

administrator   ~66969

A crash is only a crash when debug = 0. What's the behaviour in that case?

gabrieljenik

gabrieljenik

2021-11-01 13:39

manager   ~67028

Last edited: 2021-11-01 13:39

Editted the desctiption.
Attached sample group for testing

limesurvey_group_1193 (1).lsg (3,662 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Group</LimeSurveyDocType>
 <DBVersion>365</DBVersion>
 <languages>
  <language>en</language>
  <language>es</language>
 </languages>
 <groups>
  <fields>
   <fieldname>gid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>group_name</fieldname>
   <fieldname>group_order</fieldname>
   <fieldname>description</fieldname>
   <fieldname>language</fieldname>
   <fieldname>randomization_group</fieldname>
   <fieldname>grelevance</fieldname>
  </fields>
  <rows>
   <row>
    <gid><![CDATA[1193]]></gid>
    <sid><![CDATA[911651]]></sid>
    <group_name><![CDATA[First group]]></group_name>
    <group_order><![CDATA[0]]></group_order>
    <description/>
    <language><![CDATA[en]]></language>
    <randomization_group/>
    <grelevance/>
   </row>
   <row>
    <gid><![CDATA[1193]]></gid>
    <sid><![CDATA[911651]]></sid>
    <group_name/>
    <group_order><![CDATA[0]]></group_order>
    <description/>
    <language><![CDATA[es]]></language>
    <randomization_group/>
    <grelevance/>
   </row>
  </rows>
 </groups>
 <questions>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>parent_qid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>type</fieldname>
   <fieldname>title</fieldname>
   <fieldname>question</fieldname>
   <fieldname>preg</fieldname>
   <fieldname>help</fieldname>
   <fieldname>other</fieldname>
   <fieldname>mandatory</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>language</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>modulename</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[11863]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[911651]]></sid>
    <gid><![CDATA[1193]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[Q01]]></title>
    <question/>
    <preg/>
    <help/>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <question_order><![CDATA[1]]></question_order>
    <language><![CDATA[en]]></language>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
   </row>
   <row>
    <qid><![CDATA[11863]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[911651]]></sid>
    <gid><![CDATA[1193]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[Q01]]></title>
    <question/>
    <preg/>
    <help/>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <question_order><![CDATA[1]]></question_order>
    <language><![CDATA[es]]></language>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
   </row>
  </rows>
 </questions>
 <defaultvalues>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>sqid</fieldname>
   <fieldname>language</fieldname>
   <fieldname>specialtype</fieldname>
   <fieldname>defaultvalue</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[11863]]></qid>
    <scale_id><![CDATA[0]]></scale_id>
    <sqid><![CDATA[0]]></sqid>
    <language><![CDATA[en]]></language>
    <specialtype/>
    <defaultvalue><![CDATA[English default value]]></defaultvalue>
   </row>
   <row>
    <qid><![CDATA[11863]]></qid>
    <scale_id><![CDATA[0]]></scale_id>
    <sqid><![CDATA[0]]></sqid>
    <language><![CDATA[es]]></language>
    <specialtype/>
    <defaultvalue><![CDATA[Valor por defecto en español]]></defaultvalue>
   </row>
  </rows>
 </defaultvalues>
</document>
limesurvey_group_1193 (1).lsg (3,662 bytes)   
gabrieljenik

gabrieljenik

2021-11-04 00:17

manager   ~67083

PR: https://github.com/LimeSurvey/LimeSurvey/pull/2132

gabrieljenik

gabrieljenik

2021-11-08 15:20

manager   ~67175

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

LimeBot

LimeBot

2022-01-05 09:37

administrator   ~67918

Fixed in Release 5.2.0+211110

Related Changesets

LimeSurvey: master 092aadb2

2021-11-08 16:20

gabrieljenik

Committer: GitHub


Details Diff
Fixed issue 17688: When importing a group with question with default value, default values are not imported (#2132)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
Affected Issues
17688
mod - application/helpers/admin/import_helper.php Diff File

Issue History

Date Modified Username Field Change
2021-10-27 15:18 gabrieljenik New Issue
2021-10-27 15:18 gabrieljenik File Added: image.png
2021-10-27 15:18 gabrieljenik Issue generated from: 17511
2021-10-27 15:18 gabrieljenik Relationship added related to 17511
2021-10-27 15:19 ollehar Note Added: 66969
2021-10-27 15:19 ollehar Bug heat 0 => 2
2021-10-27 15:22 ollehar Assigned To => ollehar
2021-10-27 15:22 ollehar Status new => feedback
2021-11-01 13:38 gabrieljenik Summary When importing a group, crash happens => When importing a group with question with default value, default values are not imported
2021-11-01 13:38 gabrieljenik Description Updated
2021-11-01 13:38 gabrieljenik Zoho Project Synchronization Yes => |Yes|
2021-11-01 13:39 gabrieljenik Note Added: 67028
2021-11-01 13:39 gabrieljenik File Added: limesurvey_group_1193 (1).lsg
2021-11-01 13:39 gabrieljenik Bug heat 2 => 4
2021-11-01 13:39 gabrieljenik Status feedback => assigned
2021-11-01 13:39 gabrieljenik Severity crash => partial_block
2021-11-01 13:39 gabrieljenik Zoho Project Synchronization Yes => |Yes|
2021-11-04 00:17 gabrieljenik Note Added: 67083
2021-11-08 15:20 gabrieljenik Changeset attached => LimeSurvey master 092aadb2
2021-11-08 15:20 gabrieljenik Note Added: 67175
2021-11-08 15:20 gabrieljenik Assigned To ollehar => gabrieljenik
2021-11-08 15:20 gabrieljenik Resolution open => fixed
2022-01-05 09:37 LimeBot Zoho Project Synchronization Yes => |Yes|
2022-01-05 09:37 LimeBot Note Added: 67918
2022-01-05 09:37 LimeBot Status assigned => closed
2022-01-05 09:37 LimeBot Bug heat 4 => 6