feat: start a project from another one's configuration
Creating a project can name one the creator owns or administers: its statuses, transitions, types, areas, custom fields and automation rules are copied once (paused rules stay paused; rules assigning to someone who is not in the new project are left out). GraphQL templateProjectId, REST template (id or key), MCP create_project template, and a select in the web's new-project form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,8 +83,12 @@ export class ProjectsController {
|
||||
@ApiOperation({ summary: 'Create a project (you become its owner)' })
|
||||
@ApiCreatedResponse({ type: CommandResultDto })
|
||||
@ApiCommandErrors()
|
||||
create(@CurrentUser() me: User, @Body() body: CreateProjectDto) {
|
||||
return this.projects.create(me.id, body);
|
||||
async create(@CurrentUser() me: User, @Body() body: CreateProjectDto) {
|
||||
const { template, ...fields } = body;
|
||||
return this.projects.create(me.id, {
|
||||
...fields,
|
||||
templateId: template ? await this.refs.projectId(me.id, template) : null,
|
||||
});
|
||||
}
|
||||
|
||||
@Get(':project')
|
||||
|
||||
Reference in New Issue
Block a user