Package trac :: Package ticket :: Module roadmap :: Class TicketGroupStats

Class TicketGroupStats

source code

object --+
         |
        TicketGroupStats

Encapsulates statistics on a group of tickets.
Instance Methods
 
__init__(self, title, unit)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add_interval(self, title, count, qry_args, css_class, overall_completion=None)
Adds a division to this stats' group's progress bar.
source code
 
refresh_calcs(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, title, unit)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Parameters:
  • title - the display name of this group of stats (e.g. 'ticket status')
  • unit - is the units for these stats in plural form, e.g. _('hours')
Overrides: object.__init__

add_interval(self, title, count, qry_args, css_class, overall_completion=None)

source code 
Adds a division to this stats' group's progress bar.

:param title: the display name (e.g. ``'closed'``, ``'spent
              effort'``) of this interval that will be
              displayed in front of the unit name
:param count: the number of units in the interval
:param qry_args: a dict of extra params that will yield the
                 subset of tickets in this interval on a query.
:param css_class: is the css class that will be used to
                  display the division
:param overall_completion: can be set to true to make this
                           interval count towards overall
                           completion of this group of
                           tickets.

.. versionchanged :: 0.12
   deprecated `countsToProg` argument was removed, use
   `overall_completion` instead