Пример #1
0
	def test_normalize_burndown_state(self):
		state = {"all":{"total":1, "unscheduled":1}, "epic_name":{"total":1, "unscheduled":1}}
		print config.states("tracker")
		state = _normalize_burndown_state(state, config.states("tracker")) 
		self.assertEqual(state, {
                    "all":{"total":1, "unscheduled":1, "unstarted":0, "accepted":0, "started":0,"finished":0, "delivered":0}, 
                    "epic_name":{"total":1, "unscheduled":1, "unstarted":0, "accepted":0, "delivered":0, "started":0, "finished":0}})
Пример #2
0
def overview():
    current_user = flask_helper.safe_session("user_id")
    projects = _get_filtered_projects()
    possible_states = config.states("tracker")

    project_ids = list_ids(projects)
    stories = _stories_for(project_ids)

    in_progress_ids = ids_for_in_progress(stories)

    stories = keep_by_ids(stories, in_progress_ids)
    stories = prettify_stories(stories)
    stories = add_project_names(stories, projects)

    return render_template("index.html", projects=projects, user=current_user, states=possible_states, stories=stories)
Пример #3
0
def project(project_id):
    current_user = flask_helper.safe_session("user_id")

    project_list = _get_filtered_projects()
    project_found = find_project(project_list, str(project_id))

    if project_found == None:
        return redirect(url_for("overview"))

    project_id = str(project_id)
    burndown = Burndown(project_id, localdata.getBurndownStates(project_id))
    labels = burndown_labels(burndown)
    possible_states = config.states("tracker")

    return render_template("project.html", project=project_found, labels=labels, states=possible_states)
Пример #4
0
def get_states(project_type):
    response = make_response(config.states_tojson(config.states(project_type)))
    response.mimetype = "application/json"
    return response