Content
View differences
Updated by Oliver Günther about 5 years ago
# Requirements
###
###
### Template selection
* The "Use template" field is not part of the project schema
* It should be rendered at the beginning of the project form
* It is preselected with "(none)
* When selecting another value, the form needs to POST am empty payload to `/api/v3/projects/:selectedTemplate/copy/form` `/api/v3/projects/:selectedTemplate/form` to get the payload object from that project
* That payload object replaces the current form payload
* Nice Name and Identifier need to have: The frontend shows a warning dialog before reloading the form be removed
* Optionally: The frontend can override some Other values of are merged into the new project payload object
* When a template is selected,
* the the resource to POST to is the copy endpoint `/api/v3/projects/:selectedTemplate/copy`, not the create endpoint
* the API response is a Job status reference, we need to show the job status modal
* To be checked: Where to get the list of template values
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/21093/content"></div></figure>
### Advanced settings fieldset
* Most of the fields are hidden behind "Advanced settings" (see above)
* Everything other than the name (TBC the parent project?) and the template selector
* The advanced settings are collapsed by default, unless values are provided for it (e.g., when selecting a template)
### Identifier
* When creating new projects or instantiating templates, the project identifier is derived from the project's name while typing
* The rules for the project identifier are frontend decided right now
* https://github.com/opf/openproject/blob/dev/frontend/src/app/modules/augmenting/dynamic-scripts/project\_form\_listener.js#L30
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/21095/content"></div></figure>
### Parent project selector
* Creating a new subproject from within a project throug the dropdown or the project settings (for example, this link on QA: [https://qa.openproject-edge.com/projects/new?parent\_id=201)](https://qa.openproject-edge.com/projects/new?parent_id=201))
* The "Subproject of" field should be preselected with the parent project given in the URL query.
* The parent project field is located _before_ the advanced settings
* TBC: Is the subproject field _always_ located before the advanced settings?
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/21092/content"></div></figure>
### Attribute help texts
* The form labels can have an attribute help text for projects, shown as a small question mark (`<attribute-help-text>` component)
* On click, the attribute help text dialog opens
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/21094/content"></div></figure>
###
###
### Template selection
* The "Use template" field is not part of the project schema
* It should be rendered at the beginning of the project form
* It is preselected with "(none)
* When selecting another value, the form needs to POST am empty payload to `/api/v3/projects/:selectedTemplate/copy/form`
* That payload object replaces the current form payload
* Nice
* Optionally: The frontend can override some
* When a template is selected,
* the
* the API response is a Job status reference, we need to show the job status modal
* To be checked: Where to get the list of template values
### Advanced settings fieldset
* Most of the fields are hidden behind "Advanced settings" (see above)
* Everything other than the name (TBC the parent project?) and the template selector
* The advanced settings are collapsed by default, unless values are provided for it (e.g., when selecting a template)
### Identifier
* When creating new projects or instantiating templates, the project identifier is derived from the project's name while typing
* The rules for the project identifier are frontend decided right now
* https://github.com/opf/openproject/blob/dev/frontend/src/app/modules/augmenting/dynamic-scripts/project\_form\_listener.js#L30
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/21095/content"></div></figure>
### Parent project selector
* Creating a new subproject from within a project throug the dropdown or the project settings (for example, this link on QA: [https://qa.openproject-edge.com/projects/new?parent\_id=201)](https://qa.openproject-edge.com/projects/new?parent_id=201))
* The "Subproject of" field should be preselected with the parent project given in the URL query.
* The parent project field is located _before_ the advanced settings
* TBC: Is the subproject field _always_ located before the advanced settings?
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/21092/content"></div></figure>
### Attribute help texts
* The form labels can have an attribute help text for projects, shown as a small question mark (`<attribute-help-text>` component)
* On click, the attribute help text dialog opens
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/21094/content"></div></figure>