Content
View differences
Updated by Hagen Mahnke 9 months ago
### Steps to reproduce
1. Install OpenProject 13
2. Create multiple tasks and set estimated time
3. Have a workpackage some tasks with a large amount of 570 comments (570 is mentioned as an example)
2. 4. Attempt Set some arbitrary remaining time and a mismatching/unproportional completion percentage
5. Upgrade to open version 14 or higher
Context: We've migrated from the workpackage
latest 13.x branch version to latest 14.x, then upgraded PostgreSQL to v17 and moved OpenProject straight to 16.2.2 right after that
### What is the buggy behavior?
<br>
NOTE: This bug causes almost the entirety of old/pre-existing projects and tasks to be unusable, untouchable due to users' browsers hanging and server silently refusing changes/updates
* Browser freezes/becomes unresponsive
The migration to v14+'s new time/percentage behaviour is inaccurate and miscalculates percentages
* Even if - after a long wait - Example: 0.25h estimated, remaining 0.06h
* Percentage should be 76% but ends up as 75% during migration
* ~~Once the page loads, it does not work well. Scrolling breaks and mismatch exists in the page feels unresponsive.
* newer version, the webinterface seems to "endlessly?" loop recalculation clientside due to the mismatch~~ After analysis, it appears the issues comes from the large number of comments on some tasks (570+)
* Browsers slow down and freeze the moment you open the view to a task
* _Especially Especially chromium-based browsers are affected_ affected
* _Especially Especially on middle to lower end or older hardware (Intel 3rd/4th gen, faster but still noticable on 6th)_ 6th)
* _Firefox Firefox also slows down but wont freeze as extremely_ extremely
* _Profilers Profilers pinpoint these to polyfill library and callstacks go to mutationobservers/callbacks_ mutationobservers/callbacks
* _Removing Removing the callbacks through browser-extensions like tampermonkey massively increases web performance, but breaks .. input validation and actually saving changes to backend_
backend
* _When !!! This may help pinpointing
* When opening tasks that aren't arent affected- as long as they have a referenced task with that issue, the browser still experiences significant slowdown_ slowdown
* _Creating Creating new tasks and viewing or editing these works fine without performance impact_
impact
* Tring to update such tasks, like start/end-date etc have a silent 422 error, so pressing on save ends up doing nothing
* Only once you open the estimated/remaining-time and percentage popups, it will show you (in red, on % completed), that the number is mismatching the time values
* This seems... pointless? Given v14's changelog stated that this value is system calculated, not user input, so why validate?
* \=> this issue on progress values has been extracted in <mention class="mention" data-id="66592" data-type="work_package" data-text="##66592">##66592</mention>
\*\*WORKAROUND (\*\*Works, but hacky): Manual DBupdate using this query:
* update work\_packages set done\_ratio = ((estimated\_hours-remaining\_hours)/estimated\_hours\*100) where estimated\_hours IS NOT NULL and estimated\_hours != 0;
* \=> this fixes the unability to save work packages, but does not fix the performance issue
### What is the expected behavior?
1. Workpackages with large amount of comments don't experience performance issues. Openproject auto-corrects the percentage on load (serverside)
2. WebInterface wont hang
###
**Logs**
_There are no logs in the browser nor backend on this._
_However, looking at browsers' inbuilt profilers, the issues track down to "extremely long css animations" and 10s+ of javascript cputime (polyfill) most likely due to looping mutation observers/callbacks caused by validation failures (clientside)_
###
Screenshots and other files
Example error. Context: manually removing the 75% will make it auto-fill back to 75%, setting remaining time to 0 or setting the percentage to 76% fixes the current task/package.
Once the bug has been fixed, the browser will auto-complete the % to the correct 76% instead if one attempts to blank the field.
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/769615/content">
\=> this issue on progress values has been extracted in <mention class="mention" data-id="66592" data-type="work_package" data-text="##66592">##66592</mention>
### Environment information
**OpenProject installation type**
* Selfhosted, Packaged installation
* Ubuntu 20.04.6 LTS
**OpenProject version**
_16.2.2_
**Browser**
* [x] Chrome
* [x] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Operating System**
* [x] Windows
* [ ] Mac OS X
* [ ] Mobile iOS
* [ ] Mobile Android
* [ ] Linux (please specify distro)
* [ ] Chrome OS
* [ ] Other (please specify)
**Language**
_English and German_
1.
2. Create multiple tasks and set estimated time
3.
2.
5. Upgrade
Context: We've migrated from
NOTE: This bug causes almost the entirety of old/pre-existing projects and tasks to be unusable, untouchable due to users' browsers hanging and server silently refusing changes/updates
* Percentage should be 76% but ends up as 75% during migration
* ~~Once
*
* Browsers slow down and freeze the moment you open the view to a task
* _Especially
* _Especially
* _Firefox
* _Profilers
* _Removing
* When
* _Creating
* Tring to update such tasks, like start/end-date etc have a silent 422 error, so pressing on save ends up doing nothing
* Only once you open the estimated/remaining-time and percentage popups, it will show you (in red, on % completed), that the number is mismatching the time values
* This seems... pointless? Given v14's changelog stated that this value is system calculated, not user input, so why validate?
* \=> this issue on progress values has been extracted in <mention class="mention" data-id="66592" data-type="work_package" data-text="##66592">##66592</mention>
\*\*WORKAROUND (\*\*Works, but hacky): Manual DBupdate using this query:
* update work\_packages set done\_ratio = ((estimated\_hours-remaining\_hours)/estimated\_hours\*100) where estimated\_hours IS NOT NULL and estimated\_hours != 0;
* \=> this fixes the unability to save work packages, but does not fix the performance issue
1. Workpackages with large amount of comments don't experience performance issues.
2. WebInterface wont hang
###
_There are no logs in the browser nor backend on this._
_However, looking at browsers' inbuilt profilers, the issues track down to "extremely long css animations" and 10s+ of javascript cputime (polyfill) most likely due to looping mutation observers/callbacks caused by validation failures (clientside)_
Example error. Context: manually removing the 75% will make it auto-fill back to 75%, setting remaining time to 0 or setting the percentage to 76% fixes the current task/package.
Once the bug has been fixed, the browser will auto-complete the % to the correct 76% instead if one attempts to blank the field.
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/769615/content">
\=> this issue on progress values has been extracted in <mention class="mention" data-id="66592" data-type="work_package" data-text="##66592">##66592</mention>
**OpenProject installation type**
* Selfhosted, Packaged installation
* Ubuntu 20.04.6 LTS
**OpenProject version**
_16.2.2_
**Browser**
* [x] Chrome
* [x] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Operating System**
* [x] Windows
* [ ] Mac OS X
* [ ] Mobile iOS
* [ ] Mobile Android
* [ ] Linux (please specify distro)
* [ ] Chrome OS
* [ ] Other (please specify)
**Language**
_English and German_