Content
View differences
Updated by Judith Roth 4 days ago
**As** a user of OpenProject who is accustomed to the [work package attributes in CKEditor](https://qa.openproject-edge.com/wp/JTP-18)
**I want to** be able to create something similar in documents / BlockNote
**Acceptance criteria**
* There is a new slash command "work package attribute"
* When invoked, the user sees a dialog with the following fields:
* Typeahead-search for the work package
* search by id, identifier or subject (like in the "link work package" dialog)
* reuse existing search result dropdowns
* A select for the available values (attributes + custom fields of the work package)
* attributes and custom fields of the work package
* this depends on the selected work package and needs to change if the work package changes
* Checkboxes for 1. value 2. label (could also be a select with the 3 options if that would be more user-friendly - up to Parimal to decide)
* at least one must be selected, but also both can be selected at once.
* Value is preselected.
* **tbd**: How can the user select "relative addressing of the work package" (no hard ID given) in the dialog (if we don't find a good solution, this could also be a separate slash command ("work package attribute template") with the same dialog just without a work package - maybe this would even be easier to leave out in contexts where it does not apply, e.g. a document)
* After selecting everything in the dialog and confirming, a new custom inline element is inserted in the document
* It shows, according to the selection, either a label, a value or "label: value"
* It has a context menu for changing what it shows (label/value/label+value)
**Technical notes**
* Like always, we first build a simple variant and then improve it (improvement steps: Show user avatar, render status with dot, render priority with dot, render type with big letters and color)
* We already have styles for status and type, they should be reused
* You can see examples for work package attributes / expansions in CKEditor [here](https://qa.openproject-edge.com/wp/JTP-18)
* We also need a "relative" addressing variant, where we do not save the work package id, but get it from a context (so this is usable in templates). Compare with `workPackageValue:priority` (renders as workPackageValue:priority ) - this will be a separate implementation step (and we still need to discuss how to achieve this) (e.g. additional checkbox or value in the search results dropdown that is only available in certain cases)
**Out of scope / Will not be implemented** scope**
* No help text about the label (i-sign in the CKEditor implementation)
* No context menu for changing the attribute / custom field
**Permissions and visibility considerations**
* _To whom is this feature visible?_
* _When is it not visible?_
**Translation considerations**
* _Key terms and phrases in the key languages_
**Out of scope**
* <br>
_Set the_ **To be informed/consulted teams** _field to include all teams necessary to be informed of the changes._
**I want to** be able to create something similar in documents / BlockNote
**Acceptance criteria**
* There is a new slash command "work package attribute"
* When invoked, the user sees a dialog with the following fields:
* Typeahead-search for the work package
* search by id, identifier or subject (like in the "link work package" dialog)
* reuse existing search result dropdowns
* A select for the available values (attributes + custom fields of the work package)
* attributes and custom fields of the work package
* this depends on the selected work package and needs to change if the work package changes
* Checkboxes for 1. value 2. label (could also be a select with the 3 options if that would be more user-friendly - up to Parimal to decide)
* at least one must be selected, but also both can be selected at once.
* Value is preselected.
* After selecting everything in the dialog and confirming, a new custom inline element is inserted in the document
* It shows, according to the selection, either a label, a value or "label: value"
* It has a context menu for changing what it shows (label/value/label+value)
**Technical notes**
* Like always, we first build a simple variant and then improve it (improvement steps: Show user avatar, render status with dot, render priority with dot, render type with big letters and color)
* We already have styles for status and type, they should be reused
* You can see examples for work package attributes / expansions in CKEditor [here](https://qa.openproject-edge.com/wp/JTP-18)
* We also need a "relative" addressing variant, where we do not save the work package id, but get it from a context (so this is usable in templates). Compare with `workPackageValue:priority` (renders as workPackageValue:priority ) - this will be a separate implementation step (and we still need to discuss how to achieve this) (e.g. additional checkbox or value in the search results dropdown that is only available in certain cases)
**Out of scope / Will not be implemented**
* No help text about the label (i-sign in the CKEditor implementation)
* No context menu for changing the attribute / custom field
**Permissions and visibility considerations**
* _To whom is this feature visible?_
* _When is it not visible?_
**Translation considerations**
* _Key terms and phrases in the key languages_
**Out of scope**
* <br>
_Set the_ **To be informed/consulted teams** _field to include all teams necessary to be informed of the changes._