def get_formatted_graph(fmt, wbs): if fmt not in FMTS: flask.abort(404) issues = get_issues(server, build_query(("Milestone", "Meta-epic"), wbs)) graph = graphviz.Source(jira2dot(issues, attr_func=attr_func, rank_func=rank_func, ranks=cycles()), format=fmt) with tempdir() as dirname: graph.render("graph", cleanup=True, directory=dirname) return flask.send_file(os.path.join(dirname, "graph%s%s" % (os.path.extsep, fmt)))
def make_row(kpm, blank=None): row = OrderedDict() row['KPM'] = kpm.key row['Title'] = kpm.fields.summary row['Target'] = "{} {}".format(kpm.fields.customfield_11000, kpm.fields.customfield_11001) for cycle in cycles(): row[cycle] = blank return row
def testCycle(self): c = jirakit.cycles() self.assertEqual(c[0],'W15')
def makeRow(wbs, cycles, blank=None): row = OrderedDict() row['WBS'] = wbs for cycle in cycles(): row[cycle] = blank return row