Example #1
0
 def user_counts(self):
     """The counts of the items assigned to the currrent user."""
     all_assignments = []
     if self.user:
         for status_count in get_status_counts(
             self.specifications, 'assignee', key='displayname'):
             if status_count.status == self.user:
                 if status_count.count == 1:
                     status_count.status = 'blueprint'
                 else:
                     status_count.status = 'blueprints'
                 all_assignments.append(status_count)
         for status_count in get_status_counts(
             self.bugtasks, 'assignee', key='displayname'):
             if status_count.status == self.user:
                 if status_count.count == 1:
                     status_count.status = 'bug'
                 else:
                     status_count.status = 'bugs'
                 all_assignments.append(status_count)
         return all_assignments
     return all_assignments
Example #2
0
 def user_counts(self):
     """The counts of the items assigned to the currrent user."""
     all_assignments = []
     if self.user:
         for status_count in get_status_counts(self.specifications,
                                               'assignee',
                                               key='displayname'):
             if status_count.status == self.user:
                 if status_count.count == 1:
                     status_count.status = 'blueprint'
                 else:
                     status_count.status = 'blueprints'
                 all_assignments.append(status_count)
         for status_count in get_status_counts(self.bugtasks,
                                               'assignee',
                                               key='displayname'):
             if status_count.status == self.user:
                 if status_count.count == 1:
                     status_count.status = 'bug'
                 else:
                     status_count.status = 'bugs'
                 all_assignments.append(status_count)
         return all_assignments
     return all_assignments
Example #3
0
 def assignment_counts(self):
     """The counts of the items assigned to users."""
     all_assignments = self.bugtasks + self.specifications
     return get_status_counts(all_assignments,
                              'assignee',
                              key='displayname')
Example #4
0
 def specification_status_counts(self):
     """A list StatusCounts summarising the targeted specification."""
     return get_status_counts(self.specifications, 'implementation_status')
Example #5
0
 def bugtask_status_counts(self):
     """A list StatusCounts summarising the targeted bugtasks."""
     return get_status_counts(self.bugtasks, 'status')
Example #6
0
 def assignment_counts(self):
     """The counts of the items assigned to users."""
     all_assignments = self.bugtasks + self.specifications
     return get_status_counts(
         all_assignments, 'assignee', key='displayname')
Example #7
0
 def specification_status_counts(self):
     """A list StatusCounts summarising the targeted specification."""
     return get_status_counts(self.specifications, 'implementation_status')
Example #8
0
 def bugtask_status_counts(self):
     """A list StatusCounts summarising the targeted bugtasks."""
     return get_status_counts(self.bugtasks, 'status')