# Bug OP-14705 - workPackageValue macro for milestone cannot use startDate and dueDate

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-14705

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 14.0.0 |
| Observed in versions |  |
| Sprint | 14.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | Yes |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

  - In the [documentation for the wysiwyg editor](https://www.openproject.org/docs/user-guide/wysiwyg/#available-attributes-for-work-packages), the `workPackageValue` macro lists all the available attributes.

### What is the buggy behavior?

  - The attributes `startDate` and `dueDate` do not work for a work package of type milestone. One must use `date`, but it's not documented
  - Example with milestone work package \#\#53565:
      - `workPackageValue:53565:startDate` => 04/10/2024
      - `workPackageValue:53565:dueDate` => 04/10/2024
      - `workPackageValue:53565:date` =>  
  - Example with bug work package \#\#53814:
      - `workPackageValue:53814:startDate` =>  
      - `workPackageValue:53814:dueDate` =>  
      - `workPackageValue:53814:date` =>  

### What is the expected behavior?

  - For milestones
      - startDate, dueDate and date result in the same value (the one date value)
  - For non-milestones
      - startDate and dueDate show that singular date value
      - date shows the date range YYYY-MM-DD - YYYY-MM-DD
  -
