Defect #5170

Done ratio can not revert to 0% if status is used for done ratio

Added by Yuki Kita over 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:2010-03-24
Priority:NormalDue date:
Assignee:Eric Davis% Done:

100%

Category:Issues
Target version:1.0.2
Resolution:Fixed Affected version:

Description

I use issue statuses to calculate done ratio of issues, and set the done ratio of "New" to 0%, that of "Assigned" to 30%.
I changed the status of an issue from "New" to "Assigned", so the done ratio is changed from 0% to 30%.
After that I changed the status of the issue to "New", but the done ratio did not revert to 0%(stayed to 30%).
So I wrote a patch to fix the bug.

Regards

issue.rb.diff Magnifier (1.28 KB) Yuki Kita, 2010-03-24 13:09


Related issues

Duplicated by Redmine - Defect #6310: done ratio is not correct in one of the situations Closed 2010-09-06

Associated revisions

Revision 4186
Added by Eric Davis about 7 years ago

Fixes reverting an issue to a status with a done_ratio of 0%. #5170

Contributed by Felix Schäfer

History

#1 Updated by Mischa The Evil over 7 years ago

  • Assignee set to Eric Davis

Eric,

Can you take a look at this issue? Isn't this tested yet?

#2 Updated by Felix Schäfer about 7 years ago

  • Status changed from New to 7
  • Target version set to 1.0.2

I completed the patch with some tests, thanks Yuki for finding this. The commit is here: http://github.com/thegcat/redmine/commit/fc58994174b2206da0ce25e0321dd96dda62a366

I also slightly changed one of the tests to really test Issue#update_done_ratio_from_issue_status, for which the comment (source:/trunk/app/models/issue.rb#L326) states:

Set the done_ratio using the status if that setting is set. This will keep the done_ratios even if the user turns off the setting later

#3 Updated by Eric Davis about 7 years ago

  • Status changed from 7 to Resolved
  • % Done changed from 0 to 100
  • Resolution set to Fixed

Applied in r4186. Thanks for the bug report and patch.

#4 Updated by Eric Davis about 7 years ago

  • Status changed from Resolved to Closed

Merged into 1.0-stable

Also available in: Atom PDF