Exemple #1
0
    def filter(self, limit=20, **kwargs):
        # Check if there is a description flag on the keyword arguments
        description = 'description' in kwargs and kwargs.pop('description')

        # Check if there is an option checked
        if len(kwargs) == 0:
            # As default set the options to by assigned to the current user
            kwargs['assigned_to_id'] = self.redmine.user.get('current').id

        # Get all the issues with for that options
        issues = self.redmine.issue.filter(sort='status:asc', **kwargs)[:limit]

        # Return all the issues with the issues list format
        return (IssueMessages.issue_format(i, description) for i in issues)
Exemple #2
0
    def filter(self, limit=20, **kwargs):
        # Check if there is a description flag on the keyword arguments
        description = 'description' in kwargs and kwargs.pop('description')

        # Check if there is an option checked
        if len(kwargs) == 0:
            # As default set the options to by assigned to the current user
            kwargs['assigned_to_id'] = self.redmine.user.get('current').id

        # Get all the issues with for that options
        issues = self.redmine.issue.filter(sort='status:asc', **kwargs)[:limit]

        # Return all the issues with the issues list format
        return (IssueMessages.issue_format(i, description) for i in issues)