def print_jira_preflight(tce): start, duration = z.get(['start', 'duration'], tce.entry) print bcolors.header('Adding Jira worklog:'), \ 'start(%s)' % bcolors.okblue(start.split('T')[-1].split('+')[0]), \ 'duration(%s)' % bcolors.okblue(timedelta(seconds=duration)), print bcolors.okblue(tce.ticket), tce.comment, print '...',
def print_jira_preflight(tce): start, duration = z.get(["start", "duration"], tce.entry) print bcolors.header("Adding Jira worklog:"), "start(%s)" % bcolors.okblue( start.split("T")[-1].split("+")[0] ), "duration(%s)" % bcolors.okblue(timedelta(seconds=duration)), print bcolors.okblue(tce.ticket), tce.comment, print "...",
def print_valid_entries(entries): print bcolors.header(bcolors.underline("\nLogging to Jira\n")) # entries = map(get_val, entries) groups = z.groupby(z.get("description", default=""), entries) cleaned = map(split_description, groups.iteritems()) for (issue, comment), es in cleaned: print (bcolors.bold("%-8s") + " %s") % (sum_as_timedelta(es), bcolors.okblue(issue) + " " + comment)
def print_valid_entries(entries): print bcolors.header(bcolors.underline('\nLogging to Jira\n')) # entries = map(get_val, entries) groups = z.groupby(z.get('description', default=''), entries) cleaned = map(split_description, groups.iteritems()) for (issue, comment), es in cleaned: print(bcolors.bold('%-8s') + ' %s') % ( sum_as_timedelta(es), bcolors.okblue(issue) + ' ' + comment)