Example #1
0
    def get(self, project_pk):
        """
        Get Tickets for a Project
        :param project_pk: Project ID
        :return: List of tickets
        """
        prj = get_project_request(project_pk)

        tickets = []
        sprints = Sprint.get_by_project(prj)

        if prj.project_type == u'S':
            for s in sprints:
                spos = SprintTicketOrder.get_active_sprint(s)
                for spo in spos:
                    tickets.append(spo.ticket.id)

        return Ticket.get_tickets_backlog(project_pk, tickets), 200
Example #2
0
    def get(self, project_pk):
        """
        Get Tickets for backlog board

        :param project_pk: Project ID
        :return: List of tickets
        """
        tickets = []
        col_ids = []

        prj = get_project_request(project_pk)

        column_list = Column.get_by_project(prj)
        for c in column_list:
            col_ids.append(str(c.pk))

        tct_list = TicketCT.get_transitions_in_cols(col_ids)
        for t in tct_list:
            tickets.append(str(t.ticket.pk))

        results = Ticket.get_tickets_backlog(prj, not_tickets=tickets)
        return results, 200