# Bug COSTS-192 - My Time Stack view breaks with many small entries in each day (aka Mir has too many small time entries)

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Time tracking |
| Target versions | 18.0.0 |
| Observed in versions | 18.0.0 |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Log a lot of short time entries &lt;45m minutes, log one big entry to fill the entire day to 8h
    
2.  Go to the my time **Stack** view
    

### What is the buggy behavior?

*   The hours add up to 8h, but visually the boxes exceed the 8h legend on the sidebar
    

### What is the expected behavior?

1.  The box sized adjust so that all entries are properly shown
    

###   

### Screenshot before the fix

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

### Technical fix implementation details

*   Currently the grid of the Stack view always goes to 12h, regardless of what the days are like.
    
    *   The fix looks how much room the &quot;fullest&quot; day needs, adds 1 hour and then rounds to the next even hour. Never less than 8h, maximum 12h.
        
*   Currently the minimum height of an item is defined in time. Each box takes at least 45m of &quot;height&quot;.
    
    *   The fix changes this to 40px and calculates in relation to the grid height how much time this means. This is recalculated whenever the view is resized.
        
*   Currently the boxes are just stacked on top of each other without any dependencies on each other.
    
    *   The fix adjusts the bigger boxes, so that the extra room the smaller items need is subtracted from the height of the bigger items, starting with the biggest one. To still show the relative size differences, a box is never shrunk to less than 1/3 of its original size.
        
*   Currently everything is forced into the available space.
    
    *   &nbsp;The fix calculates the minimal height at which all items of the busiest day still fit (40px each, every box keeping at least 1/3 of its size). If the available space is less than this, the view gets vertical scrolling enabled.
        

<br>

### Screenshot after the fix

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

When the viewport is too small, the header and footer stay sticky:

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