/// <remarks/> public void updateWorklogWithNewRemainingEstimateAsync(string in0, RemoteWorklog in1, string in2, object userState) { if ((this.updateWorklogWithNewRemainingEstimateOperationCompleted == null)) { this.updateWorklogWithNewRemainingEstimateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnupdateWorklogWithNewRemainingEstimateOperationCompleted); } this.InvokeAsync("updateWorklogWithNewRemainingEstimate", new object[] { in0, in1, in2}, this.updateWorklogWithNewRemainingEstimateOperationCompleted, userState); }
/// <summary> /// Receives XML notification from TFS event subscription service and sends updated to Jira as a WorkLog /// </summary> /// <param name="eventXml">Xml content</param> /// <param name="tfsIdentityXml">TFS Instance Information</param> public void Notify(string eventXml, string tfsIdentityXml) { XmlDocument xml = new XmlDocument(); xml.LoadXml(eventXml); string comment = xml.SelectSingleNode("//Comment").InnerText; string creationDate = xml.SelectSingleNode("//CreationDate").InnerText; string content = TransformXmlInMemory(eventXml, File.ReadAllText(HostingEnvironment.ApplicationPhysicalPath + "\\commenter.xslt")); //Uses the ISSUE_ID_PATTERN to determine related Issues to comment on them. string matchingPattern=ConfigurationManager.AppSettings["ISSUE_ID_PATTERN"]; var matches = System.Text.RegularExpressions.Regex.Matches(comment, matchingPattern ); if (matches.Count > 0) { using (JiraSoapServiceService jiraSvc = new JiraSoapServiceService()) { try { // HttpException Happens if Login Fails. Exception logged. var token = jiraSvc.login(ConfigurationManager.AppSettings["jiraAccount"], ConfigurationManager.AppSettings["jiraAccountPassword"]); foreach (Match match in matches) { //Ignore non existing Issues try { RemoteIssue issue = jiraSvc.getIssue(token, match.Value); if (issue != null) { var workLog = new RemoteWorklog() { timeSpent = "1m", startDate = Convert.ToDateTime(creationDate), comment = content }; jiraSvc.addWorklogAndRetainRemainingEstimate(token, match.Value, workLog); //jiraSvc.addComment(token, "EV-1", new RemoteComment() { body = content}); } } catch (Exception ex) { log.Debug(String.Format("Issue {0} Not Found.", match.Value),ex); } } } catch(Exception ex) { log.Error("Unhandled Exception",ex); } } } //log.Debug(eventXml); }
public void updateWorklogWithNewRemainingEstimate(string in0, RemoteWorklog in1, string in2) { this.Invoke("updateWorklogWithNewRemainingEstimate", new object[] { in0, in1, in2}); }
/// <remarks/> public void updateWorklogWithNewRemainingEstimateAsync(string in0, RemoteWorklog in1, string in2) { this.updateWorklogWithNewRemainingEstimateAsync(in0, in1, in2, null); }
public void updateWorklogAndRetainRemainingEstimate(string in0, RemoteWorklog in1) { this.Invoke("updateWorklogAndRetainRemainingEstimate", new object[] { in0, in1}); }
/// <remarks/> public void updateWorklogAndRetainRemainingEstimateAsync(string in0, RemoteWorklog in1) { this.updateWorklogAndRetainRemainingEstimateAsync(in0, in1, null); }
/// <remarks/> public void addWorklogAndRetainRemainingEstimateAsync(string in0, string in1, RemoteWorklog in2) { this.addWorklogAndRetainRemainingEstimateAsync(in0, in1, in2, null); }
public RemoteWorklog addWorklogAndRetainRemainingEstimate(string in0, string in1, RemoteWorklog in2) { object[] results = this.Invoke("addWorklogAndRetainRemainingEstimate", new object[] { in0, in1, in2}); return ((RemoteWorklog)(results[0])); }
/// <remarks/> public void addWorklogAndAutoAdjustRemainingEstimateAsync(string in0, string in1, RemoteWorklog in2, object userState) { if ((this.addWorklogAndAutoAdjustRemainingEstimateOperationCompleted == null)) { this.addWorklogAndAutoAdjustRemainingEstimateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnaddWorklogAndAutoAdjustRemainingEstimateOperationCompleted); } this.InvokeAsync("addWorklogAndAutoAdjustRemainingEstimate", new object[] { in0, in1, in2}, this.addWorklogAndAutoAdjustRemainingEstimateOperationCompleted, userState); }
/// <remarks/> public void addWorklogWithNewRemainingEstimateAsync(string in0, string in1, RemoteWorklog in2, string in3) { this.addWorklogWithNewRemainingEstimateAsync(in0, in1, in2, in3, null); }
public RemoteWorklog addWorklogWithNewRemainingEstimate(string in0, string in1, RemoteWorklog in2, string in3) { object[] results = this.Invoke("addWorklogWithNewRemainingEstimate", new object[] { in0, in1, in2, in3}); return ((RemoteWorklog)(results[0])); }