Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
16647Bug reportsCentral participant databasepublic2020-10-08 15:32
Reporterphitho Assigned Togabrieljenik  
PrioritynormalSeverityminor 
Status assignedResolutionreopened 
Product Version3.23.3 
Summary16647: Can't select seperator for CPDB export - export doesn't recognise text
Description

I exported the CPDC, but I wasn't able to select a separator. As a default, comma was selected. However, this messes up the variable, since some of the categories, in my case, contain a comma, but answer categories are not put in brackets.

TagsNo tags attached.
Complete LimeSurvey version number (& build) Version 3.23.3+200909
I will donate to the project if issue is resolvedNo
Sync to Zoho Project
Browser
Database & DB-VersionI'm not the admin
Server OS (if known)
Webserver software & version (if known)
PHP VersionI'm not the admin

Relationships

related to 16672 closedgabrieljenik Bug reports Can't select seperator for CPDB export - export doesn't recognise text 
child of 16683 assignedgabrieljenik Feature requests Allow select seperator for CPDB export 

Activities

cdorin

cdorin

2020-09-15 15:17

manager   ~59816

I am not sure if I understand the issue - could you please provide us a .csv file to test it? It does not sound like a LS problem but more of a third-party spreadsheet software issue.

DenisChenu

DenisChenu

2020-09-15 15:28

developer   ~59817

Seems clear : we surely don't use https://www.php.net/manual/en/function.fputcsv.php

@phitho ; can you confirm the way to reproduce

  1. Add firstname "jean,jacque'
  2. Add name "name'
    Export CS
    Loo at file :
    name,jean,jacque
phitho

phitho

2020-09-15 16:23

reporter   ~59819

@denischenu: Yes, that's the problem. What would be needed is to either put the different answers in quotation marks to mark them as text or to be able to select a separator. Thanks!

DenisChenu

DenisChenu

2020-09-15 16:24

developer   ~59820

@cdorin : clear enough ?
@phitho : please, if you can add a screenshot of data, and a partial exported bad csv file.

cdorin

cdorin

2020-09-15 16:31

manager   ~59821

I see - will mark it as confirmed and see the easiest solution to implement it

phitho

phitho

2020-09-15 16:32

reporter   ~59822

Attached you find a sample file.

central_1600180280.csv (711 bytes)   
participant_id,firstname,lastname,email,language,blacklisted,owner_uid,date,birthyear,gender,state,inhabtitant,education1,education2,municipality,city,btw2017recall,eu2019recall,education3,edu_school,edu_job,vote_intention_local,school
a2d4242b-0e86-4815-a28d-8385cfd3bd09,,,qqq@qqq.qq,en,N,69,,1991,Männlich,Nordrhein-Westfalen,,,,,Dortmund, krfr. Stadt,Sonstiges,Die Linke,,Abitur, EOS - Erweiterte Oberschule mit Abschluss 12. Klasse, Fachhochschulreife,Sonstiges,Die Linke,
cf40ae7a-b323-4ee2-976d-238b4bbbcb5e,,,qqq@qqq.qq,en,N,69,,1957,Weiblich,Nordrhein-Westfalen,,,,,Bielefeld, krfr. Stadt,Grüne,Grüne,,Abgeschlossenes Studium an Hoch- oder Fachhochschule, Universität, Polytechnikum,,Grüne,
central_1600180280.csv (711 bytes)   
cdorin

cdorin

2020-09-15 16:40

manager   ~59825

So, I would choose to have a CSV field separator option in the pop up displayed on the screen when you confirm which columns are being selected. Separators to be used: Comma, Semicolon, Tab .

phitho

phitho

2020-09-15 16:42

reporter   ~59828

That should work! It could be problematic if someone imports open end answers where users may have entered e.g. tab in their answers, but for standard questions, that should work.

DenisChenu

DenisChenu

2020-09-15 16:47

developer   ~59832

Last edited: 2020-09-15 16:48

View 2 revisions

@cdorin : NO ! please , real csv : https://www.php.net/manual/en/function.fputcsv.php

enclosure.
This allow
abcde,123,"tot,titi","toto,\"titi"

It's the way PHP do with fputcsv, why create bad code when PHP have a great function ?

DenisChenu

DenisChenu

2020-09-15 16:49

developer   ~59833

You can still allow update separator (dor some broken tools)

But : still use enclosure AND escape_char (default is OK with good tools and bad tools)

cdorin

cdorin

2020-09-15 16:52

manager   ~59834

Yep, sounds cleaner. I will create a ticket in that regard

cdorin

cdorin

2020-09-15 16:52

manager   ~59835

@gabrieljenik, could you please push the fix to LS4 as well when there is time?

gabrieljenik

gabrieljenik

2020-09-21 22:47

developer   ~59914

Created a ticket for the enhancement: 16683
Created a ticket for LS4: 16672

DenisChenu

DenisChenu

2020-09-22 08:48

developer   ~59916

@gabrieljenik great :+1:

gabrieljenik

gabrieljenik

2020-09-22 16:23

developer   ~59927

Last edited: 2020-09-22 16:24

View 2 revisions

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1599
Used 'fputcsv' in CPDBExport() with default args

gabrieljenik

gabrieljenik

2020-09-23 11:47

developer   ~59939

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30506

lime_release_bot

lime_release_bot

2020-09-28 13:09

administrator   ~59971

Fixed in Release 3.23.6+200929

phitho

phitho

2020-10-07 15:06

reporter   ~60101

Hello everyone,
our admin installed the latest version, but still, it's not possible to select a separator for export. I only see this for import.
I understood that this should have been fixed in the latest release - or does our admin need to alter the code at some point?

DenisChenu

DenisChenu

2020-10-07 15:19

developer   ~60102

@phitho : the issue is fixed now : even with " and ' and , inside name firstname etc : you can oprn the csv file after.

The feature is here : https://bugs.limesurvey.org/view.php?id=16683

See https://bugs.limesurvey.org/view.php?id=16647#c59914

phitho

phitho

2020-10-07 16:14

reporter   ~60103

@DenisChenu: Thank you, but why doesn't it work then? When I click on "export all participants", I can only select the attributes, but not the separator. Our admin confirmed this. We have Version 3.23.7+201006.

DenisChenu

DenisChenu

2020-10-07 16:37

developer   ~60105

Did you look at discussion ? I answer at previous message …

phitho

phitho

2020-10-07 16:43

reporter   ~60106

@DenisChenu: Thank you, I'm sorry, I can't really follow. Does our admin need to change the code at some point in order to make this work? When I export the CPDB, I can't select the separator, it's still ",".

DenisChenu

DenisChenu

2020-10-07 16:58

developer   ~60107

Yes : it's still , but there are no issue when open it via excel or libre office , it's a clean CSV

phitho

phitho

2020-10-07 17:05

reporter   ~60108

I have the same issue as in the example csv I sent above.

gabrieljenik

gabrieljenik

2020-10-08 00:51

developer   ~60112

@phitho What is the issue?
a - You are not able to choose the separator ?
b - The created file (wth the default separator) is corrupted?

Thanks!

phitho

phitho

2020-10-08 09:19

reporter   ~60114

@gabrieljenik
a - yes, I can only select the attributes to be exported. It looks exactly like the old setup, before the update.
b - the created file with the default separator looks OK when I import it, it seems to put the quotation marks around some answer categories (but not all of them) - sorry for the wrong info yesterday. Still, I would prefer to be able to select a separator and if I understood, this should be working?

cdorin

cdorin

2020-10-08 15:32

manager   ~60125

It won't be possible to choose a separator - it will add too much work and the process will get even more complicated. Can you give us a use case where the current (update) system does not work as required?

Related Changesets

LimeSurvey: 3.x-LTS 5f58ca88

2020-09-22 16:19:59

gabrieljenik

Details Diff
Fixed issue 16647: Can't select seperator for CPDB export - export doesn't recognise text

Used 'fputcsv' in CPDBExport() with default args.
Affected Issues
16647
mod - application/helpers/export_helper.php Diff File

LimeSurvey: 3.x-LTS 540de77e

2020-09-23 11:47:08

ollehar


Committer: GitHub Details Diff
Fixed issue 16647: Can't select seperator for CPDB export - export doesn't recognise text

Dev: Merge pull request #1599 from gabrieljenik/bug/16647--Can't-select-seperator-for-CPDB-export---export-doesnt-recognise-text
Affected Issues
16647
mod - application/helpers/export_helper.php Diff File

Issue History

Date Modified Username Field Change
2020-09-09 10:55 phitho New Issue
2020-09-15 15:17 cdorin Status new => feedback
2020-09-15 15:17 cdorin Note Added: 59816
2020-09-15 15:28 DenisChenu Note Added: 59817
2020-09-15 16:23 phitho Note Added: 59819
2020-09-15 16:23 phitho Status feedback => new
2020-09-15 16:24 DenisChenu Note Added: 59820
2020-09-15 16:31 cdorin Note Added: 59821
2020-09-15 16:32 phitho Note Added: 59822
2020-09-15 16:32 phitho File Added: central_1600180280.csv
2020-09-15 16:40 cdorin Note Added: 59825
2020-09-15 16:42 phitho Note Added: 59828
2020-09-15 16:47 DenisChenu Note Added: 59832
2020-09-15 16:48 DenisChenu Note Edited: 59832 View Revisions
2020-09-15 16:49 DenisChenu Note Added: 59833
2020-09-15 16:52 cdorin Note Added: 59834
2020-09-15 16:52 cdorin Note Added: 59835
2020-09-15 16:53 cdorin Assigned To => gabrieljenik
2020-09-15 16:53 cdorin Priority none => normal
2020-09-15 16:53 cdorin Status new => confirmed
2020-09-15 16:53 cdorin Zoho Sprints => |Yes|
2020-09-16 17:38 gabrieljenik Issue cloned: 16672
2020-09-16 17:38 gabrieljenik Relationship added related to 16672
2020-09-21 22:46 gabrieljenik Issue cloned: 16683
2020-09-21 22:46 gabrieljenik Relationship added child of 16683
2020-09-21 22:47 gabrieljenik Note Added: 59914
2020-09-22 08:48 DenisChenu Note Added: 59916
2020-09-22 16:23 gabrieljenik Note Added: 59927
2020-09-22 16:24 gabrieljenik Note Edited: 59927 View Revisions
2020-09-23 11:47 ollehar Changeset attached => LimeSurvey 3.x-LTS 540de77e
2020-09-23 11:47 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 5f58ca88
2020-09-23 11:47 gabrieljenik Note Added: 59939
2020-09-23 11:47 gabrieljenik Resolution open => fixed
2020-09-28 13:09 lime_release_bot Zoho Sprints Yes => |Yes|
2020-09-28 13:09 lime_release_bot Note Added: 59971
2020-09-28 13:09 lime_release_bot Status confirmed => closed
2020-10-07 15:06 phitho Status closed => feedback
2020-10-07 15:06 phitho Resolution fixed => reopened
2020-10-07 15:06 phitho Note Added: 60101
2020-10-07 15:19 DenisChenu Note Added: 60102
2020-10-07 16:14 phitho Note Added: 60103
2020-10-07 16:14 phitho Status feedback => assigned
2020-10-07 16:37 DenisChenu Note Added: 60105
2020-10-07 16:43 phitho Note Added: 60106
2020-10-07 16:58 DenisChenu Note Added: 60107
2020-10-07 17:05 phitho Note Added: 60108
2020-10-08 00:51 gabrieljenik Note Added: 60112
2020-10-08 09:19 phitho Note Added: 60114
2020-10-08 15:32 cdorin Note Added: 60125