public void ReportBug(BugException ex) { if (!this.active) { return; } try { var fulltext = new ApplicationEditorSearchConstraint("query", ex.Title); var statuses = ManiphestSearchConstraintFactory.Statuses(new List <string> { "open", "stalled" }); var maniphestTasks = this.maniphest.Search(constraints: new[] { fulltext, statuses }); var fod = maniphestTasks.FirstOrDefault(x => x.Title == ex.Title); if (fod == null) { fod = new ManiphestTask { Title = ex.Title, Description = ex.Description, Priority = "normal", Points = 1 }; fod.AddProjects(this.projectPhid); } else { fod.AddComment(ex.Description); fod.Points = fod.Points.GetValueOrDefault(0) + 1; } this.maniphest.Edit(fod); } catch (Exception ex2) { this.logger.Warn("Exception while logging bug", ex2); this.logger.Error("Exception encountered while logging bug; including here for reference", ex); } }
public void Pop(ManiphestTask task, DateTime?stopTime = null, string note = null) { this.Pop(task.ObjectPHID, stopTime, note); }
public void Push(ManiphestTask task, DateTime startTime) { this.Push(task.ObjectPHID, startTime); }