Skip to content

Fix rounding issue in progress calculation

Abhilash Kotte requested to merge akotte-fix-rounding-issue-progress-widget into master

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

  1. Ensure okrs_mvc feature flag is enabled. https://docs.gitlab.com/ee/user/okrs.html
Feature.enabled(:okrs_mvc)
  1. Create a new Objective under Plan -> issues. Under New issue dropdown, select new objective, give it a title. I made this one confidential but I don't think it matters.
  2. 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.

Merge request reports