Beispiel #1
0
 /// <remarks/>
 public void createIssueWithParentWithSecurityLevelAsync(string in0, RemoteIssue in1, string in2, long in3) {
     this.createIssueWithParentWithSecurityLevelAsync(in0, in1, in2, in3, null);
 }
Beispiel #2
0
 /// <remarks/>
 public void createIssueWithParentWithSecurityLevelAsync(string in0, RemoteIssue in1, string in2, long in3, object userState) {
     if ((this.createIssueWithParentWithSecurityLevelOperationCompleted == null)) {
         this.createIssueWithParentWithSecurityLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OncreateIssueWithParentWithSecurityLevelOperationCompleted);
     }
     this.InvokeAsync("createIssueWithParentWithSecurityLevel", new object[] {
                 in0,
                 in1,
                 in2,
                 in3}, this.createIssueWithParentWithSecurityLevelOperationCompleted, userState);
 }
Beispiel #3
0
 /// <remarks/>
 public void createIssueWithParentAsync(string in0, RemoteIssue in1, string in2) {
     this.createIssueWithParentAsync(in0, in1, in2, null);
 }
Beispiel #4
0
 public RemoteIssue createIssueWithParentWithSecurityLevel(string in0, RemoteIssue in1, string in2, long in3) {
     object[] results = this.Invoke("createIssueWithParentWithSecurityLevel", new object[] {
                 in0,
                 in1,
                 in2,
                 in3});
     return ((RemoteIssue)(results[0]));
 }
Beispiel #5
0
 /// <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);
 }
Beispiel #6
0
 public RemoteIssue createIssueWithParent(string in0, RemoteIssue in1, string in2) {
     object[] results = this.Invoke("createIssueWithParent", new object[] {
                 in0,
                 in1,
                 in2});
     return ((RemoteIssue)(results[0]));
 }
Beispiel #7
0
 /// <remarks/>
 public void createIssueAsync(string in0, RemoteIssue in1) {
     this.createIssueAsync(in0, in1, null);
 }
Beispiel #8
0
 public RemoteIssue createIssue(string in0, RemoteIssue in1) {
     object[] results = this.Invoke("createIssue", new object[] {
                 in0,
                 in1});
     return ((RemoteIssue)(results[0]));
 }
Beispiel #9
0
        protected override void Append(LoggingEvent loggingEvent)
        {
            var summary = Layout != null ? RenderLoggingEvent(loggingEvent) : loggingEvent.MessageObject.ToString();

            var issue = new RemoteIssue
            {
                project = ProjectKey,
                type = IssueTypeId,
                summary = summary.Truncate(SummaryMaxCharCount)
            };
            if (!string.IsNullOrEmpty(AssigneeUsername)) issue.assignee = AssigneeUsername;
            if (!string.IsNullOrEmpty(ComponentId)) issue.components = new[] { new RemoteComponent { id = ComponentId } };
            var description = new StringBuilder();
            if (summary.Length > SummaryMaxCharCount) description.AppendFormat("Message: {0}\n", summary);
            description.AppendFormat("Level: {0}\n", loggingEvent.Level);
            description.AppendFormat("Logger: {0}\n", loggingEvent.LoggerName);
            if (loggingEvent.ExceptionObject != null)
            {
                description.Append("\n{code:title=Exception}");
                description.Append(loggingEvent.GetExceptionString());
                description.Append("{code}");
            }
            issue.description = description.ToString();

            var service = new JiraSoapServiceService { Url = Url };
            var token = service.login(Username, Password);
            LogLog.Debug(string.Format("Sending request to JIRA: {0}", issue.ToJson()));
            var returnedIssue = service.createIssue(token, issue);
            LogLog.Debug(string.Format("Got response from JIRA: {0}", returnedIssue.ToJson()));
            LogLog.Debug(string.Format("Created issue: {0}", returnedIssue.key));
        }
Beispiel #10
0
        internal static RemoteIssue CreateIssue(string token, RemoteIssue remoteIssue)
        {
            if (!IsConfigured)
                throw new InvalidOperationException("JIRA is not configured");

            if (Log.IsDebugEnabled)
                Log.DebugFormat("Creating issue:\n{0}", remoteIssue.ToJson());

            remoteIssue = Service.createIssue(token, remoteIssue);

            if (Log.IsDebugEnabled)
                Log.DebugFormat("Successfully created issue:\n{0}", remoteIssue.ToJson());

            return remoteIssue;
        }
Beispiel #11
0
        /// <summary>
        /// Adds attachments to a given issue.
        /// </summary>
        /// <param name="token"></param>
        /// <param name="remoteIssue"></param>
        /// <param name="remoteAttachments">A tuple where the first string array is a list of names, the second array a base64 encoded list of files corresponding to the names.</param>
        internal static void AddAttachments(string token, RemoteIssue remoteIssue, Tuple<string[], string[]> remoteAttachments)
        {
            if (!IsConfigured)
                throw new InvalidOperationException("JIRA is not configured");

            if (Log.IsDebugEnabled)
                Log.DebugFormat("Adding attachments to issue {0}: {1}", remoteIssue.key, remoteAttachments.Item1.Join());

            Service.addBase64EncodedAttachmentsToIssue(token, remoteIssue.key, remoteAttachments.Item1, remoteAttachments.Item2);
        }