feat: import and export tickets as CSV
Every ticket of a project can be downloaded as CSV, and a CSV exported from TaskStream or from Jira can be imported: types, statuses, priorities and people are matched by id or name, the rest falls back with a warning, and parents are rebuilt. The settings page previews an import before it creates anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,17 @@ export interface CreateIssueProps extends IssueDetails {
|
||||
type: string;
|
||||
reporterId: string;
|
||||
assigneeId?: string | null;
|
||||
/** Imports only: an active status of the workflow to start in. */
|
||||
status?: string | null;
|
||||
}
|
||||
|
||||
/** The status asked for if it is active in the workflow, else the first one. */
|
||||
function startingStatus(
|
||||
status: string | null | undefined,
|
||||
workflow: ProjectWorkflow,
|
||||
): string {
|
||||
const asked = status ? workflow.status(status) : undefined;
|
||||
return asked && !asked.archived ? asked.id : workflow.initialStatus();
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@@ -51,7 +62,7 @@ export class IssueFactory {
|
||||
area: props.area ?? null,
|
||||
title,
|
||||
description: details.description ?? null,
|
||||
status: workflow.initialStatus(),
|
||||
status: startingStatus(props.status, workflow),
|
||||
priority: props.priority ?? IssuePriority.MEDIUM,
|
||||
reporterId: props.reporterId,
|
||||
assigneeId: props.assigneeId ?? null,
|
||||
|
||||
Reference in New Issue
Block a user