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

Replace with CSV File Upload Not Working #2505

Open
abisz opened this issue Dec 27, 2024 · 5 comments · Fixed by #2502
Open

Replace with CSV File Upload Not Working #2505

abisz opened this issue Dec 27, 2024 · 5 comments · Fixed by #2502

Comments

@abisz
Copy link

abisz commented Dec 27, 2024

The "Replace with CSV File Upload" functionality is not working and leads to a weird bug, where the cube shows no cards even though the overview knows how many cards it suppose to have.
https://cubecobra.com/cube/list/a025ea6e-83c5-4022-a427-3c974c9adfa6

To Reproduce
Steps to reproduce the behavior:

  1. Go to List view
  2. Export CSV
  3. Import the exported CSV with "Replace with CSV File Upload"
@KaelenProctor
Copy link
Contributor

This should be resolved by #2502. The cards were not shown because they were being categorised by the default "Color category" sort due to issues in the CSV import/export, but could be seen by enabling the Display -> Show unsorted cards option. Assuming the issue is the same, when the fix is deployed the cards will show without any action needed.

@KaelenProctor
Copy link
Contributor

@abisz PR #2502 has been deployed, would you be able to re-test the "Replace with CSV File Upload" and verify that the problem is resolved?

@abisz
Copy link
Author

abisz commented Dec 31, 2024

Ok I see. I tested it and now it behaves exactly as expected.
Thank you and happy new year!

@abisz
Copy link
Author

abisz commented Dec 31, 2024

Actually I have another question, is there any documentation about what format the csv files need to have to use the functionality? I just tested it with the exported file, but I would like to update a cube with just a list of card names, which doesn't work currently and leads to a server error

@KaelenProctor
Copy link
Contributor

@abisz There has been a reported issue with the upload when the file is just a list of card names (see #2499) which might be what you are running into. As far as I can see there is no documentation for the CSV format however for the file to be detected as CSV instead of plain text there must be at least 4 fields in the CSV of which Name is the only required one, though Set and Collector Number are both useful to help identify the exact card (such as in the case of multiple printings).

The text format only requires the Name as well, but can accept optional values for the number of cards, set, and collector number in the format of: [Count]x Name [(Set)] [Collector number] (where [] indicates optional). Also there is no header line in the TXT format, the first line needs to be a card.
Examples:

  1. 7x Seven Dwarves (ELD) 141 adds 7 of the Seven Dwarves card
  2. 7x Seven Dwarves does the same
  3. Seven Dwarves adds a single Seven Dwarves card

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