Skip to content

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

Description

@Kumar-s75

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions