private XDoc BuildBugListHTMLTable(RemoteIssue[] issues) { XDoc ret = new XDoc("div").Attr("class", "DW-table Jira-table table"); ret.Start("table").Attr("border", 0).Attr("cellspacing", 0).Attr("cellpadding", 0).Attr("class", "table feedtable sortable"); // header ret.Start("tr") .Elem("th", "Bug#") .Elem("th", "Summary") .Elem("th", "Status") .Elem("th", "Priority") .Elem("th", "Opened By") .Elem("th", "Assigned To") .End(); int count = 0; foreach (RemoteIssue bug in issues) { count++; RemoteStatus status = null; if (!string.IsNullOrEmpty(bug.status)) { _statuses.TryGetValue(bug.status, out status); } RemotePriority priority = null; if (!string.IsNullOrEmpty(bug.priority)) { _priorities.TryGetValue(bug.priority, out priority); } string trClass = string.Format("{0} {1}", (count % 2 == 0) ? "even" : "odd", status == null ? string.Empty : status.name); ret.Start("tr").Attr("class", trClass); ret.Start("td"); ret = BuildBugLink(bug, ret); ret.End(); //td; ret.Elem("td", bug.summary); if (status == null) { ret.Elem("td", ""); } else { ret.Start("td").Start("img").Attr("src", status.icon).Attr("alt", status.name).Attr("title", status.description).End().Value(status.name).End(); } if (priority == null) { ret.Elem("td"); } else { ret.Start("td").Start("img").Attr("src", priority.icon).Attr("alt", priority.name).Attr("title", priority.description).End().Value(priority.name).End(); } ret.Elem("td", bug.reporter ?? string.Empty); ret.Elem("td", bug.assignee ?? string.Empty); ret.End();//tr } ret.End(); // table return ret; }
//--- Methods --- private XDoc BuildBugLink(RemoteIssue bug, XDoc doc) { RemoteStatus status = null; if (!string.IsNullOrEmpty(bug.status)) { _statuses.TryGetValue(bug.status, out status); } bool strikeThrough = status != null && Array.Exists<string>(STRIKE_THROUGH_STATUSES, delegate(string s) { return StringUtil.EqualsInvariantIgnoreCase(status.name.ToLowerInvariant(), s); }); string title = string.Format("{0} (Reporter: {1} Assigned To: {2})", bug.summary, bug.reporter, bug.assignee); doc.Start("a").Attr("href", _uri.At("browse").At(bug.key)).Attr("title", title); if (strikeThrough) { doc.Start("del").Value(bug.key).End(); } else { doc.Value(bug.key); } doc.End(); return doc; }
/// <remarks/> public void createIssueAsync(string in0, RemoteIssue in1) { this.createIssueAsync(in0, in1, null); }
/// <remarks/> public void createIssueAsync(string in0, RemoteIssue in1, object userState) { if ((this.createIssueOperationCompleted == null)) { this.createIssueOperationCompleted = new System.Threading.SendOrPostCallback(this.OncreateIssueOperationCompleted); } this.InvokeAsync("createIssue", new object[] { in0, in1}, this.createIssueOperationCompleted, userState); }
public RemoteIssue createIssue(string in0, RemoteIssue in1) { object[] results = this.Invoke("createIssue", new object[] { in0, in1}); return ((RemoteIssue)(results[0])); }