id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 9718,[PATCH] rounding error can corrupt progress bar in milestone_view,Andrew C Martin ,Andrew C Martin ,"Note the progress bar in the bottom right corner of this image: [[Image(progress_bar.png)]] Despite the fact that there are zero closed tickets, the progress bar shows ~100% are. If you look at the HTML generated below, you can see that the first TD is getting a negative width. It should actually show ""display: none"" since there are no ""closed"" tickets. IE/Chrome/FF all interpret the negative width as ~100% width: {{{
}}} I am proposing attachment:progress_bar.patch to fix this issue. roadmap.py doesn't handle a boundary case for when the rounded sum of all the percentages can be greater than 100. This is easy to reproduce: 1. Fire up a new trac test environment 2. Append these lines to your trac.ini: {{{ [milestone-groups] closed = closed closed.order = 0 closed.overall_completion = true new = new new.order = 1 new.css_class = new new.label = new new.overall_completion = false active = * active.order = 2 active.css_class = open active.label = in progress }}} 3. Write 8 tickets and assign all of them to milestone1. 4. ""Accept"" all but 1 ticket in the tickets' workflow. 5. Click on milestone1 from the roadmap. I think there's an issue with the way that ""1 / 8"" gets calculated when ""overall_completion = false"" that may be a separate bug... ",defect,closed,normal,0.12.2,roadmap,0.12dev,normal,fixed,progressbar roadmap milestone,,,,,