Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries with , comma aren’t recognised by csv format #482

Closed
atarora opened this issue Apr 5, 2022 · 2 comments · Fixed by #483
Closed

Queries with , comma aren’t recognised by csv format #482

atarora opened this issue Apr 5, 2022 · 2 comments · Fixed by #483

Comments

@atarora
Copy link
Contributor

atarora commented Apr 5, 2022

Describe the bug
Queries with , (comma) aren’t recognised by csv format when importing rating into the case

To Reproduce
Steps to reproduce the behavior:

  1. Go to specific case
  2. Click on 'import into case' and select 'ratings' tab
  3. Choose CSV format and click 'browse' , following to select the designated file to import
  4. See error

Expected behavior
The Queries + ratings should be imported as correctly

Screenshots
Screenshot 2022-04-05 at 14 21 19

Additional context
Add any other context about the problem here.

@epugh
Copy link
Member

epugh commented Apr 5, 2022

So, this is a "works as designed", however maybe the error message could be better. Since we column delimit the CSV, if you have a , in your query, you need to wrap it it " characters. I'll test that actually works ;-)

@epugh
Copy link
Member

epugh commented Apr 5, 2022

I dug in, and it turns out we don't handle wrapping with " ;-(.

epugh pushed a commit that referenced this issue Apr 5, 2022
@epugh epugh closed this as completed in #483 Apr 5, 2022
epugh added a commit that referenced this issue Apr 5, 2022
* properly export commas in a query

* fixes #482 by checking for wrapping

* support importing queries that have commas in them

* rubocop

Co-authored-by: [email protected] <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants