Content
View differences
Updated by Kabiru Mwenja about 16 hours ago
**As** a user writing rich text (work package descriptions, comments, wiki pages, meeting notes)
**I want to** choose whether a multi-value attribute macro renders its values as a list of lines or on a Context: [https://www.openproject.org/docs/user-guide/wysiwyg/#available-attributes-for-work-packages](https://www.openproject.org/docs/user-guide/wysiwyg/#available-attributes-for-work-packages)
CkEditor currently supports single line
**so that** the value macro output fits its surroundings: a block list when it stands alone, inline when it is part of a sentence. `workPackageValue:1234:version`
**Acceptance criteria** <figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Version</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><code class="op-uc-code">workPackageValue:1234:version</code></p></td></tr></tbody></table></figure>
* Attribute value macros accept an optional trailing layout argument: `workPackageValue:X:attribute:multiline` [And version by ID or `workPackageValue:X:attribute:singleline`.
* Without the argument, multi-value attributes (e.g. `targetVersions`, multi-select list custom fields, multi-user custom fields) render multi-line: one value per line, as today.
* With `singleline`, all values render on one line, comma-separated.
* The argument is available on `workPackageValue` and `projectValue` macros for all attributes. On single-value attributes it has no effect.
* The relative form without an id works with the argument: `workPackageValue:targetVersions:singleline` refers name](https://www.openproject.org/docs/user-guide/wysiwyg/#links-to-openproject-resources)
<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Version by ID or name</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><code class="op-uc-code">version#3</code>, <code class="op-uc-code">version:"Release 1.0.0"</code></p></td></tr></tbody></table></figure>
These need to the current work package.
* Quoted custom field names work with the argument: `workPackageValue:X:"My list field":singleline`.
* `multiline` and `singleline` are reserved keywords; an attribute that happens be adapted to carry such a name remains addressable by quoting it.
* A misspelled keyword (e.g. `:block`) is not swallowed: the macro renders normally and the unrecognized text stays visible next to it, so the mistake is apparent.
* `workPackageValue:X:version` keeps rendering for existing content and behaves as the single-line variant, backed by the version derived from the support multi-value target versions.
**OPEN POINT**: How should target versions (existing comments, journals and wiki pages cannot be migrated).
* The layout argument is honored in both render paths: web (comments, descriptions, wiki) and exports (PDF).
**Permissions and visibility considerations**
* _To whom is this feature visible?_ Unchanged from existing macros: values resolve with the viewing user's permissions; a user only sees attribute values of work packages/projects they can see.
* _When is it not visible?_ Unchanged: without visibility of the referenced resource, the existing "not found" macro error appears. The layout argument grants no additional data access.
**Translation considerations**
* `singleline` and `multiline` are reserved syntax keywords and not localized, consistent with macro names like `workPackageValue`. Attribute names remain localizable as today.
* No new UI strings expected; existing macro error messages are reused.
**Out of scope**
* CKEditor UI support for inserting the layout argument (autocomplete/toolbar); the argument is typed manually.
* Changing how multi-value attributes render outside macros (tables, single view, timeline).
* Migration or rewriting of existing user content.
* Other macro families (`workPackageLabel` semantics, quickinfo `###`, resource link macros like `version#3`). rendered within CkEditor macros?
**I want to** choose whether a multi-value attribute macro renders its values as a list of lines or on a
CkEditor currently supports
**so that** the
**Acceptance criteria**
* Attribute value macros accept an optional trailing layout argument: `workPackageValue:X:attribute:multiline`
* Without the argument, multi-value attributes (e.g. `targetVersions`, multi-select list custom fields, multi-user custom fields) render multi-line: one value per line, as today.
* With `singleline`, all values render on one line, comma-separated.
* The argument is available on `workPackageValue` and `projectValue` macros for all attributes. On single-value attributes it has no effect.
* The relative form without an id works with the argument: `workPackageValue:targetVersions:singleline` refers
<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Version by ID or name</p></td><td class="op-uc-table--cell"><p class="op-uc-p"><code class="op-uc-code">version#3</code>, <code class="op-uc-code">version:"Release 1.0.0"</code></p></td></tr></tbody></table></figure>
These need
* Quoted custom field names work with the argument: `workPackageValue:X:"My list field":singleline`.
* `multiline` and `singleline` are reserved keywords; an attribute that happens
* A misspelled keyword (e.g. `:block`) is not swallowed: the macro renders normally and the unrecognized text stays visible next to it, so the mistake is apparent.
* `workPackageValue:X:version` keeps rendering for existing content and behaves as the single-line variant, backed by the version derived from the
**OPEN POINT**: How should target
* The layout argument is honored in both render paths: web (comments, descriptions, wiki) and exports (PDF).
**Permissions and visibility considerations**
* _To whom is this feature visible?_ Unchanged from existing macros: values resolve with the viewing user's permissions; a user only sees attribute values of work packages/projects they can see.
* _When is it not visible?_ Unchanged: without visibility of the referenced resource, the existing "not found" macro error appears. The layout argument grants no additional data access.
**Translation considerations**
* `singleline` and `multiline` are reserved syntax keywords and not localized, consistent with macro names like `workPackageValue`. Attribute names remain localizable as today.
* No new UI strings expected; existing macro error messages are reused.
**Out of scope**
* CKEditor UI support for inserting the layout argument (autocomplete/toolbar); the argument is typed manually.
* Changing how multi-value attributes render outside macros (tables, single view, timeline).
* Migration or rewriting of existing user content.
* Other macro families (`workPackageLabel` semantics, quickinfo `###`, resource link macros like `version#3`).