kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Keep data unchanged through a bulk user export and re-import

Open rtibbles opened this issue 2 weeks ago • 3 comments

🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:

  • Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
  • Confirm that you’ve read the guidelines in your comment.

Overview

Bulk user export prefixes cells that start with =, +, -, @, | or % with ' so spreadsheets don't run them as formulas. Bulk import doesn't remove the prefix, so exporting users and importing the same file changes their data.

Complexity: Low Target branch: develop

Context

  • On develop at fe298f5449, a class named -A and a full name -Bob- export as '-A and '-Bob- (core/utils/csv.py#L71-L83). Importing that file creates a second class '-A and stores the full name as '-Bob-.

The Change

  • Bulk export should also prefix values that already start with ', so the prefix is always one added character.
  • Bulk import should remove one leading ' and turn \| back into | in values that had a prefix.

Acceptance Criteria

  • [ ] Exporting users and importing the same file leaves class names, full names and other text fields unchanged.
  • [ ] A value that starts with ' in the facility's data survives the round trip.
  • [ ] Tests cover a round trip for each of = + - @ | %, a value starting with ', and a value containing |.

AI usage

I had Claude Code sweep Kolibri for crashes and wrong results caused by unexpected data and reproduce each one. I chose the grouping. Claude Code drafted the issue.

rtibbles avatar Nov 15 '26 20:11 rtibbles

Hi! 👋

This issue is available for contribution and supports self-assignment. Here's how to get started:

  • Comment /assign to assign yourself to this issue
  • You can have up to 2 issues assigned at a time across all community repos
  • Dropping an issue has a 7-day cooldown before the slot opens up
  • Link your pull request to this issue when you submit it

📖 Read the Contributing guidelines before starting.

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Nov 15 '26 21:11 learning-equality-bot

/assign

rajdhruvsingh avatar Nov 16 '26 04:11 rajdhruvsingh

Hi! 👋

You've been assigned to this issue. Here's what to do next:

  • Read the issue description carefully and make sure you understand the requirements
  • Link your pull request to this issue when you submit it
  • If you can no longer work on this, unassign yourself so others can pick it up

Good luck! 😊

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Nov 16 '26 04:11 learning-equality-bot