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
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
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')
def specification_status_counts(self): """A list StatusCounts summarising the targeted specification.""" return get_status_counts(self.specifications, 'implementation_status')
def bugtask_status_counts(self): """A list StatusCounts summarising the targeted bugtasks.""" return get_status_counts(self.bugtasks, 'status')
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')