# Bug COSTS-5 - Cost query for work package does not show children / value differs from spentTime

Project: Stream Time & Costs
Status: closed
URL: https://community.openproject.org/work_packages/COSTS-5

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 15.3.0 |
| Observed in versions |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

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

## Costs

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

## Description

  - See the work package <https://community.openproject.com/wp/33250>

  - Observe its spent time (20.83 hours currently)

  - follow its link to the cost query

  - The sum only shows 18.50 hours (currently)

**Expected behavior**

The sums on the cost query include the children of the work package

**Actual behavior**

The cost query only shows time booked for the work package itself.

Duplicate report

### Steps to reproduce

1.  Create at least a parent and one or more child work packages
    
2.  Log &quot;Spent time&quot; in the child work package
    
3.  Observe the parent show the sum of all logged &quot;spent times&quot; from the parent and the child elements
    
4.  Then click on the spent time to see details
    

### What is the buggy behavior?

*   The user only sees only the 8h logged on the parent TASK&nbsp;
    

### What is the expected behavior?

1.  The report should include all work packages that contribute to the 24h the user clicks on
    

### Screenshots and other files

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/112263/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/112264/content">

###
