Exemplo n.º 1
0
def _get_filtered_projects():
    projects = ProjectList(localdata.getProjectsXML())
    current_user = flask_helper.safe_session("user_id")

    user_projects = listify(localdata.get_cached_data(current_user))

    projects = remove_private_projects(projects, user_projects)
    projects = filter_on_ids(projects, config.ignore)

    return remove_private_projects(projects, user_projects)
Exemplo n.º 2
0
def wip_json():
    project_list = ProjectList(localdata.getProjectsXML())
    project_ids = list_ids(project_list)

    stories_xml_list = [localdata.getStoriesXML(str(id)) for id in project_ids]

    stories = StoryList(stories_xml_list)
    users = UserList(stories)

    return userlist_tojson(users)
Exemplo n.º 3
0
def wip(type=None):

    project_list = ProjectList(localdata.getProjectsXML())
    project_ids = list_ids(project_list)

    stories_xml_list = [localdata.getStoriesXML(str(id)) for id in project_ids]

    stories = StoryList(stories_xml_list)
    users = UserList(stories)

    return render_template("wip.html", projects=project_list, users=users)
Exemplo n.º 4
0
import sys, os
from os.path import abspath, dirname, join
sys.path.append(abspath(join(dirname(__file__),'libs')))

#change current working director so the data is found and place in the correct directory. 
os.chdir(abspath(join(dirname(__file__))))

from api import tracker
from api import localdata

from classes.project import Project, ProjectList, Burndown, addState, burndown_tojson, projectlist_tojson, find_project
from classes.story import Story, StoryList 
from classes.user import  User, UserList, userlist_tojson
import config

localdata.saveProjectsXML(tracker.getProjects())
project_list = ProjectList(localdata.getProjectsXML())

for project in project_list:
	test_stories = tracker.getStories(project.id)
	localdata.saveStoriesXML(test_stories, str(project.id))

for project in project_list:
	burndown = Burndown(project.id, localdata.getBurndownStates(project.id))
	test_stories = StoryList([localdata.getStoriesXML(project.id)])
	burndown = addState(burndown, test_stories)
	localdata.saveBurndownStates(burndown.states, project.id)