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

Basic Export creates invalid CSVs when no ratings exist #364

Closed
sstults opened this issue May 28, 2021 · 2 comments · Fixed by #371
Closed

Basic Export creates invalid CSVs when no ratings exist #364

sstults opened this issue May 28, 2021 · 2 comments · Fixed by #371

Comments

@sstults
Copy link
Member

sstults commented May 28, 2021

Describe the bug
CSV readers throw an error when the header line specifies a number of columns but all records do not have that number of columns.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a Case where some queries have not been rated
  2. Click on Export
  3. Scroll down to Basic
  4. Click Export
  5. Examine the CSV: Entries that have no ratings do not supply the correct number of commas (2)

Expected behavior
If a query doesn't have ratings it should either be skipped altogether or empty columns added. For example, a query for "foo" would look like this:

query,docid,rating
foo,,

The way it works now is:

query,docid,rating
foo

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@epugh
Copy link
Member

epugh commented Jun 3, 2021

Hey @sstults what about

query,docid,rating
foo, , 

@epugh
Copy link
Member

epugh commented Jun 3, 2021

Never mind, I got it to:

query,docid,rating
foo,, 

epugh pushed a commit that referenced this issue Jun 3, 2021
@epugh epugh linked a pull request Jun 3, 2021 that will close this issue
@epugh epugh closed this as completed in #371 Jun 4, 2021
epugh added a commit that referenced this issue Jun 4, 2021
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