# Feature DREAM-764 - Simple selection of workPackage and project attributes for macros

Project: Stream Design System
Status: specified
URL: https://community.openproject.org/work_packages/DREAM-764

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Product Backlog |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Frontend components and Primer design system, Modules and project features / Text editor / CKEditor5, Administration / Custom fields, Modules and project features / Project attributes |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | OP Dev Dream Team |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**Acceptance criteria**

  - The "+ Insert" of the CkEditor menu gets two new options:
    
      - "Project attribute"
    
      - "Work package attribute"

  - Clicking 'Project attribute' opens a dialog with two fields:
    
      - Project, with an auto-complete (defaults to current project but editable)
    
      - Project attribute, with an autocomplete (empty by default)
        
          - This lists only active project attributes for the selected project
        
          - It is a single select
    
      - There are two buttons in the footer:
        
          - Cancel (secondary)
        
          - Add (primary)

  - Clicking 'Work package attribute' opens a dialog with two fields:
    
      - *\[open\] Is this possible to do this within a single dialog? Else we can split it to two dialogs.*
    
      - Work package' with an auto-complete (empty by default)
    
      - Work package attribute, with an autocomplete (empty by default)
        
          - This lists only work package attributes available for that work package
        
          - It is a single select
    
      - There are two buttons in the footer:
        
          - Cancel (secondary)
        
          - Add (primary)

  - After adding an attribute using the dialog, the macro syntax (e.g. `projectValue:id:version`) gets rendered in the current cursor position within the CkEditor as normal text.
