Edgewall Software
Modify

Ticket #9721 (closed defect: fixed)

Opened 19 months ago

Last modified 16 months ago

[PATCH] milestone groups do not adhere to 'overall_completion = False'

Reported by: Andrew C Martin <andrew.c.martin@…> Owned by: rblank
Priority: normal Milestone: 0.12.2
Component: roadmap Version: 0.11.6
Severity: minor Keywords: roadmap milestone-groups
Cc:
Release Notes:
API Changes:

Description (last modified by rblank) (diff)

As I hinted at in #9718, milestone groups defined in TracIni do not adhere to 'overall_completion = False'. roadmap.py wraps the value of this field in a bool(), which always returns True for a non-empty string.

I have written attachment:overall_completion.patch which I believe corrects this issue.

Reproducible by adding 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

Then observe that 'new' tickets do count towards your completion total.

This is an issue in the current trunk, and I can confirm it existed as of the 0.11.6 branch.

Attachments

overall_completion.patch (1.8 KB) - added by Andrew C Martin <andrew.c.martin@…> 19 months ago.
trac-0.12-stable-r10436-inverted-booleans.diff (1.4 KB) - added by Christopher A. Stelma <chris@…> 16 months ago.
fix for two inverted booleans from r10308

Download all attachments as: .zip

Change History

Changed 19 months ago by Andrew C Martin <andrew.c.martin@…>

comment:1 in reply to: ↑ description Changed 19 months ago by Andrew C Martin <andrew.c.martin@…>

Replying to Andrew C Martin <andrew.c.martin@…>:

Then observe that 'new' tickets don't count towards your completion total.

That should read "Then observe that 'new' tickets do count towards your completion total."

comment:2 Changed 19 months ago by rblank

  • Description modified (diff)
  • Milestone set to 0.12.2
  • Owner set to rblank

Thanks for the patch.

comment:3 Changed 19 months ago by Stefan

  • Version changed from 0.12dev to 0.11.6

can confirm it's a 0.11.6 issue as well and hence updated the version to reflect that being a 0.11.6 bug.

comment:4 Changed 19 months ago by rblank

The fix is actually quite a bit simpler if you accept to import the "private" variable _TRUE_VALUES from trac.config. I have applied this simple fix in [10307].

But _TRUE_VALUES is used too much (and often badly, as case is often neglected). We already have trac.util.as_bool(), so I'll adapt it to be "compatible" and just use it everywhere.

comment:5 follow-up: Changed 19 months ago by rblank

  • Resolution set to fixed
  • Status changed from new to closed

The uses of _TRUE_VALUES have been refactored in [10308].

Changed 16 months ago by Christopher A. Stelma <chris@…>

fix for two inverted booleans from r10308

comment:6 in reply to: ↑ 5 ; follow-up: Changed 16 months ago by Christopher A. Stelma <chris@…>

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to rblank:

The uses of _TRUE_VALUES have been refactored in [10308].

this inverted two of the booleans, I noticed this because now only hidden repositories show in the timeline filter list (the opposite of expected behavior).
fix in trac-0.12-stable-r10436-inverted-booleans.diff

comment:7 in reply to: ↑ 6 Changed 16 months ago by rblank

  • Resolution set to fixed
  • Status changed from reopened to closed

Replying to Christopher A. Stelma <chris@…>:

this inverted two of the booleans,

Oops, good catch! Patch applied in [10437]. Thanks!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from rblank. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.