mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-24 22:25:15 +00:00
This change fixes a few issues with the TickTick import: 1. BOM (Byte Order Mark) Handling: Added stripBOM() function to properly handle UTF-8 BOM at the beginning of CSV files 2. Multi-line Status Section: Updated header detection to handle the multi-line status description in real TickTick exports 3. CSV Parser Configuration: Made the CSV parser more lenient with variable field counts and quote handling 4. Test Infrastructure: Added missing logger initialization for tests 5. Field Mapping: Fixed the core issue where CSV fields weren't being mapped to struct fields correctly The main problem was in the newLineSkipDecoder function where: - Header detection calculated line skip count on BOM-stripped content - CSV decoder was also stripping BOM and applying the same skip count - This caused inconsistent positioning and empty field mapping Rewrote the decoder to use a scanner-based approach with consistent BOM handling. Resolves https://github.com/go-vikunja/vikunja/issues/1870
862 B
862 B
| 1 | Date: 2025-11-25+0000 | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | Version: 7.1 | |||||||||||||||||||||||
| 3 | Status: 0 Normal 1 Completed 2 Archived | |||||||||||||||||||||||
| 4 | Folder Name | List Name | Title | Kind | Tags | Content | Is Check list | Start Date | Due Date | Reminder | Repeat | Priority | Status | Created Time | Completed Time | Order | Timezone | Is All Day | Is Floating | Column Name | Column Order | View Mode | taskId | parentId |
| 5 | Work | Project Alpha | Task with multiline description | TEXT | urgent, work | This is a task description that spans multiple lines. It has paragraphs and everything! Including special characters: #, *, @ | N | 0 | 0 | 2022-10-09T15:09:48+0000 | -1099511627776 | Europe/Berlin | false | list | 1 | |||||||||
| 6 | Work | Project Alpha | Regular task | TEXT | Simple description | N | 0 | 0 | 2022-10-09T15:10:00+0000 | -1099511627775 | Europe/Berlin | false | list | 2 |