Jump to content

RefractTrack Export and Import: Difference between revisions

From Pixel Refraction Studio
Created page with "== Export and Import == A project's tickets can be exported and re-imported as either '''JSON''' (the default format) or '''CSV''', gated by <code><nowiki>backups:export</nowiki></code> and <code><nowiki>backups:import</nowiki></code> respectively. Both are project-scoped permissions — see Permissions and Roles. === Exported fields === Both formats export the same set of fields, in the same order, from a single shared definitio..."
 
No edit summary
Line 1: Line 1:
== Export and Import ==
== Export and Import ==


A project's tickets can be exported and re-imported as either '''JSON''' (the default format) or '''CSV''', gated by <code><nowiki>backups:export</nowiki></code> and <code><nowiki>backups:import</nowiki></code> respectively. Both are project-scoped permissions — see [[RefractTrack_Permissions_and_Roles|Permissions and Roles]].
A project's entire set of tasks can be exported as a backup or spreadsheet, and re-imported later — whether that's to restore from a backup, move tasks into a new project, or just work with the data in a tool like Excel.


=== Exported fields ===
Two formats are available:


Both formats export the same set of fields, in the same order, from a single shared definition (<code><nowiki>export_field_definitions()</nowiki></code>), so the two formats can never drift out of sync with each other:
* '''JSON''' — the default, best for backing up and restoring a project exactly as it was, since it keeps everything (including full comment and history threads) in its original shape.
* '''CSV''' — a plain spreadsheet format, handy for opening in Excel, Google Sheets, or similar tools.


* Task code (<code><nowiki>old_code</nowiki></code>)
Both formats always export the exact same information, in the exact same order, so switching between them never means losing anything.
* Title
* Type
* Priority
* Stage (by name)
* Review status
* Assignee (by username)
* Due date
* Description
* Expected behavior / Actual behavior / Steps to reproduce (bug fields)
* Groups (by name)
* Created-by (by username)
* Created-at timestamp
* Archived-at timestamp
* Activity — the full comment and system activity log for the task (see [[RefractTrack_Comments_and_Activity_Log|Comments and Activity Log]])


CSV serializes the activity log into a single JSON-encoded cell; JSON keeps it as a native nested array.
=== What's included ===


=== Import behavior ===
Every task's title, type, priority, column, review status, assignee, due date, description, groups, bug details (if any), and full comment/activity history — plus who created it and when. Whether a task is archived comes along too, so an archived task is still archived after being brought back in.


* '''Code rewriting''': imported tasks are assigned fresh task numbers in the target project rather than reusing the source instance's numbers, avoiding collisions.
=== Bringing tasks back in ===
* '''Archived status is preserved''' through the round-trip — an archived task stays archived after import.
* '''Stage and group matching is scoped to the import's target project''' — an imported task's stage/group names are matched against the ''destination'' project's own stages and groups (see [[RefractTrack_Stages|Stages]] and [[RefractTrack_Groups|Groups]]), not the source project's.
* '''Activity log included''' — comments and system history come along with each task.
* A dropped or renamed field only needs to be added or removed from the shared field-definition map once; both export formats and the CSV header-row validation on import derive from that single map automatically.


=== CSV-specific handling ===
When you import tasks into a project, RefractTrack gives them fresh task numbers in that project rather than reusing the old ones, so there's never a numbering collision. Column names and tags on the imported tasks are matched up against whichever project you're importing '''into''' — so if a column or tag doesn't already exist there, make sure to create it first (or rename things to match) before importing.
 
CSV export/import includes a formula-injection guard (<code><nowiki>csv_unsafe_cell()</nowiki></code>) that neutralizes cell values starting with characters like <code><nowiki>=</nowiki></code>, <code><nowiki>+</nowiki></code>, <code><nowiki>-</nowiki></code>, or <code><nowiki>@</nowiki></code> that spreadsheet software could otherwise interpret as a formula. This guard currently runs unconditionally on both the CSV and JSON import paths, even though JSON export never applies it — a harmless no-op in practice except for the rare case of real content that happens to start with one of those characters, which is a known, low-priority inconsistency rather than a security gap.


=== Related pages ===
=== Related pages ===
Line 42: Line 23:
* [[RefractTrack_Projects|Projects]]
* [[RefractTrack_Projects|Projects]]
* [[RefractTrack_Permissions_and_Roles|Permissions and Roles]]
* [[RefractTrack_Permissions_and_Roles|Permissions and Roles]]
* [[RefractTrack_Known_Limitations|Known Limitations]]

Revision as of 00:14, 29 August 2026

Export and Import

A project's entire set of tasks can be exported as a backup or spreadsheet, and re-imported later — whether that's to restore from a backup, move tasks into a new project, or just work with the data in a tool like Excel.

Two formats are available:

  • JSON — the default, best for backing up and restoring a project exactly as it was, since it keeps everything (including full comment and history threads) in its original shape.
  • CSV — a plain spreadsheet format, handy for opening in Excel, Google Sheets, or similar tools.

Both formats always export the exact same information, in the exact same order, so switching between them never means losing anything.

What's included

Every task's title, type, priority, column, review status, assignee, due date, description, groups, bug details (if any), and full comment/activity history — plus who created it and when. Whether a task is archived comes along too, so an archived task is still archived after being brought back in.

Bringing tasks back in

When you import tasks into a project, RefractTrack gives them fresh task numbers in that project rather than reusing the old ones, so there's never a numbering collision. Column names and tags on the imported tasks are matched up against whichever project you're importing into — so if a column or tag doesn't already exist there, make sure to create it first (or rename things to match) before importing.