nextcloud / nextcloud/deck

CSV export leaves trailing commas in tags and assigned-user fields

Open Beginner friendly
#8,361 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Create a card with one or more tags or assigned users.
  2. Export the board as CSV.
  3. Open the exported file.
  4. Inspect the Tags and Assigned users columns for that card.
  5. 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 main branch
  • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.