# Bug OP-14931 - Totals of non-parent work packages are updated when status is changed in administration

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

## Open points

_No work packages_

## Details

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

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Christophe Bliard |
| 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

2 ways to trigger the issue.

the first way:

1.  Have progress calculation in work-based mode (Administration &gt; Work packages &gt; Settings)
    
2.  Create a lone work package
    
3.  Set work and remaining work for it
    
4.  In administration &gt; Work packages &gt; Settings, change progress calculation to status-based mode
    
    1.  \=&gt; the activity for the work package will show &quot;total remaining work&quot; and &quot;total % complete&quot; updated
        

the second way:

1.  Be already in status-based mode for progress calculation (Administration &gt; Work packages &gt; Settings)
    
2.  Create a lone work package
    
3.  Set work and remaining work for it
    
4.  Set a status to it
    
5.  In administration &gt; Work packages &gt; Statuses, change the % complete of the status to something else
    
    1.  \=&gt; the activity for the work package will show &quot;total remaining work&quot; and &quot;total % complete&quot; updated
        

### What is the buggy behavior?

*   Totals should not be computed for non-parent work packages. If a work package does not have any children, it does not have any totals
    

### What is the expected behavior?

1.  Totals should not be computed, so the entries &quot;total remaining work updated&quot; and &quot;total % complete updated&quot; should not be visible.
    
2.  Totals of all non-parent work packages are unset in a migration with a meaningful journal entry from system user (in case some users triggered that bug).
    

### Screenshots and other files

<img class="image_resized op-uc-image op-uc-image_inline" style="width:960px;" src="/api/v3/attachments/101637/content">

In the above screenshot:

*   system was in work-based mode, I set work and remaining work on it (first activity item)
    
*   I then switched to status-based mode. System updated progress values and totals (second activity item). totals should not have been updated (bug)
    
*   I then changed work and remaining work to 7h. It removed the totals, which is correct (third activity item)
    
*   I then changed the status % complete from 0% to 60%. System updated progress values and totals (fourth activity item). totals should not have been updated (bug)
    

### Environment information

**OpenProject installation type**

*   [x] Hosted cloud edition
*   [ ] Packaged installation
    *   What distribution?
        
*   [ ] Docker All-in-one container
*   [ ] Docker-compose installation
*   [ ] Other (please specify)

**OpenProject version**

14.0.0 / pre-14.0.1 : 14.0.1.21bb349abf0d5f3e876598de77392f94ba6c88ad

stage environment, Thu, 02 May 2024 13:44:19 GMT, core [21bb349abf0d5f3e876598de77392f94ba6c88ad](https://github.com/opf/openproject/commits/21bb349abf0d5f3e876598de77392f94ba6c88ad)
