Ejemplo n.º 1
0
##############################################################################
print "Pivotal Tracker Projects"
choice = ""

valid_choices = [str(i) for i in projects.keys() + ["q", "Q"]]

while choice not in valid_choices:
    print "\n".join(project_choices)
    choice = raw_input("Choose a Project #: ")

if choice in ["q", "Q"]:
    sys.exit()

project = projects[int(choice)]
# Some projects require https, if so, set it on the Pivotal instance
pv.use_https = project["use_https"]


##############################################################################
# Find all unstarted Stories for this project, create a dictionary keyed by id
##############################################################################
_stories = pv.projects(project["id"]).stories(filter="state:unstarted").get_etree()

print "%s has %d Stories to be started" % (project["name"], len(_stories))

stories = {}
story_choices = []

for pos, story in enumerate(_stories):
    id = story.find("id").text
    name = story.find("name").text