Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue #13845: Can't export and then import tab-separated text s…
…urvey file
- Loading branch information
1 parent
7e9e5e0
commit 0099036
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, what happened to the other fix for ranking question? Does import and activate survey work?
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment : the rules about question code not starting by a number are only for question, not sub question. Sub question starting by a number is allowed …
I‘m not at my office , but think a better fix is to set the parent_qid before save the question, no ?
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subquestion codes are validated during tsv import, so it won't work. Feel free to test.
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Don't forget to check the structure of the activated survey table (lime_survey_xxxxx) to make sure there are no duplicate subquestions or something.
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked it.
There is no difference in survey table structure between surveys imported via lss or tsv file.
So it looks that it works okay.
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Good testing, Dominik! ⭐
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes , subquestion code validated, but rules didn't force to start with an alpha …
And without a tsv file : i can not understand. I see only one way : Sub question are created without parent question …
See the rules
For subquestion : there are only other and time that is disable, else : alphanum
LimeSurvey/application/models/Question.php
Line 167 in 4dcc3bd
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question : did you test your fix : https://bugs.limesurvey.org/view.php?id=13858 ?
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it before and it worked fine.
But now it looks like it's broken.
Don't worry, I'm building a new export function for tsv, so there won't be any differences between lss and tsv.
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$row['name'] = 'SQ'.subqName;
this can NEVER work …Else : rework totally TSV seems more a refactoring … since we don't have a TSV with ranking from 2.73 : we can not really test. But i'm sure its don't really broke survey … with the fix from the pull request …
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominikvitt Please … time to revert this line and merge #1092
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted. All this code will be replaced by Dominik's work later.
0099036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When refactoring : remember multi language files. We had big issues with it before.
And I think we must «silently» fix some parts on import: for example if a Question didn't have primary language : don't import it :) (or delete if after import (unsure if survey fixer fix this)