public Issue GetIssueById(string issueId) { var issuesManagement = new IssueManagement(_connection); var issue = issuesManagement.GetIssue(issueId); return(issue); }
private static void PrintEntryList(IEnumerable <IEntry <ShortTrackingFormatPayload> > entries, IssueManagement issueManagement) { DateTime date = DateTime.MinValue; TimeSpan total = TimeSpan.Zero; foreach (var trakkrEntry in entries) { if (trakkrEntry.Timestamp.Date != date) { date = trakkrEntry.Timestamp.Date; total = TimeSpan.Zero; } var minutes = (int)Math.Round(trakkrEntry.Duration.TotalMinutes); total += TimeSpan.FromMinutes(minutes); dynamic issue = issueManagement.GetIssue(trakkrEntry.Payload.Query); string summary = issue.summary; Interaction.Notice($"{trakkrEntry.Timestamp.ToShortDateString()}\t// Task: {minutes}m\t// Day:{(int)total.TotalHours}h {total:mm}m\t// {trakkrEntry.Payload.Query}\t >> {summary} >> {trakkrEntry.Payload.Descrition}"); } }
protected override void ProcessRecord() { var issue = IssueManagement.GetIssue(IssueId); WriteObject(issue); }