CSV export leaves trailing commas in tags and assigned-user fields
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Describe the bug
CSV export builds tag and assigned-user values by appending ", " after every entry. It then calls slice(0, -1), which removes only the final space and leaves the final comma:
https://github.com/nextcloud/deck/blob/main/src/services/BoardApi.js#L203-L220
For example, labels Backend and Urgent are serialized as:
Backend, Urgent,
instead of:
Backend, Urgent
The same logic is used for assigned users.
This was found by reviewing the CSV serialization code on the current main branch.
To Reproduce
- Create a card with one or more tags or assigned users.
- Export the board as CSV.
- Open the exported file.
- Inspect the Tags and Assigned users columns for that card.
- Observe the trailing comma in each non-empty multi-value field.
Expected behavior
Tags and assigned users should be separated with , without a trailing separator.
Screenshots
Not applicable. Example output:
Actual: Backend, Urgent,
Expected: Backend, Urgent
Client details:
- OS: Not environment-specific
- Browser: Not environment-specific
- Version: Current
mainbranch - Device: Desktop
Server details
Not environment-specific; the defect is in client-side CSV serialization.
Logs
No error is logged. The generated CSV contains the incorrectly formatted values.
Suggested fix
Build the values using map(...).join(', ') rather than manually appending and trimming separators. This would also make the intended formatting explicit.
Related issue
#8041 discusses missing cards and metadata in board exports. This report is limited to incorrect formatting of tag and assigned-user values that are already included in CSV export.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/services/BoardApi.js around lines 203-220, where CSV tag and assigned-user values are serialized. Reproduce the export with cards containing multiple tags or assigned users, then verify that each non-empty field separates entries with ", " without a trailing comma. Add or update coverage for both fields if the repository has relevant CSV export tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100