Fix rounding issue in progress calculation
What does this MR do and why?
Fix rounding issue in progress calculation
When the value is 29, ruby math is converting it to 28 This MR uses .to_d to make correct convertions.
Also, added more checks and test cases for compute_progress method
Issue: #426081 (closed)
Screenshots or screen recordings
How to set up and validate locally
- Ensure
okrs_mvc
feature flag is enabled. https://docs.gitlab.com/ee/user/okrs.html
Feature.enabled(:okrs_mvc)
- Create a new Objective under Plan -> issues. Under
New issue
dropdown, selectnew objective
, give it a title. I made this one confidential but I don't think it matters. - Set the progress to 29. A system note is created that it was set to 29 now.(In previous versions, you will see the value to be 28)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.