Content
View differences
Updated by Judith Roth 2 days ago
**As** a user
**I want to** create a new work package from the document
**so that** I can easily organise work without switching context.
**Acceptance criteria**
* Invoke via Slash command
* Same as for "link work package", but with "create" instead of "link"
* Only users who are allowed to create work packages see the command (?)
* After the slash command is invoked, a modal is shown where required and most important attributes can be set:
* subject
* project
* if (if rendered in OpenProject context and inside a project, this is prefilled with the current project
project)
* other possible projects can be chosen via dropdown (`/api/v3/work_packages/available_projects`)
* only projects where the user is allowed to create work packages are listed
* type
* the possible types depend on the project (**get** `/api/v3/projects/{id}/types`)
* prefilled with the type that was selected on creation of the last work package
* if no work package was created before, the default type is selected (the first in the list)
* status
* available statuses depend on the type, so the type needs to be chosen first
* assignee
* `/api/v3/workspaces/4/available_assignees`
* Creates a work package link the document
* When invoked on an empty paragraph / new line a card work package link is created
* When invoked in the middle of a line a inline work package link is created
**Technical hints**
* An empty POST `/api/v3/projects/<id>/work_packages/form` returns the schema for the form. For each attribute it includes either links <br>
**Translation considerations**
* The slash command needs to be translated (same logic as for the link work package command)
**I want to** create a new work package from the document
**so that** I can easily organise work without switching context.
**Acceptance criteria**
* Invoke via Slash command
* Same as for "link work package", but with "create" instead of "link"
* Only users who are allowed to create work packages see the command (?)
* After the slash command is invoked, a modal is shown where required and most important attributes can be set:
* subject
* project
* if
* only projects where the user is allowed to create work packages are listed
* type
* prefilled with the type that was selected on creation of the last work package
* if no work package was created before, the default type is selected (the first in the list)
* status
* assignee
* Creates a work package link the document
* When invoked on an empty paragraph / new line a card work package link is created
* When invoked in the middle of a line a inline work package link is created
**Technical hints**
**Translation considerations**
* The slash command needs to be translated (same logic as for the link work package command)