def get_current_sprint(project_id, api_response = True): sprint = sprint_select.current_sprint(project_id) if api_response: return response.success(json.dumps(sprint.serialize())) else: return sprint.serialize()
def get_current_sprint_with_cards(project_id): sprint = sprint_select.current_sprint(project_id) standard_cards = card_select.standard_cards_from_sprint(sprint) for card in standard_cards: sprint.add_card(card) return response.success(sprint.serialize())
def add_card(card_id, sprint_id = None): if sprint_id is None: sprint = sprint_select.current_sprint() sprint_id = sprint.id response = card_update.sprint_for(card_id, sprint_id) return response