Exemplo n.º 1
0
        public void AddComment(string issue, CommentObjHeader comment)
        {
            var data = new DTO.JiraObjs.Post.CommentHeader()
            {
                body = comment
            };

            JiraClient.Post($"issue/{issue}/comment", data);
        }
Exemplo n.º 2
0
        public void AddWork(string key, CommentObjHeader comment, string time, string fecha)
        {
            var data = new DTO.JiraObjs.Post.WorkLog()
            {
                comment = comment, timeSpent = time, started = fecha
            };

            JiraClient.Post($"issue/{key}/worklog", data);
        }
Exemplo n.º 3
0
 public IssueTransition(string idTransition, CommentObjHeader comment)
 {
     this.transition.id = idTransition;
     if (comment != null)
     {
         this.update         = new Update();
         this.update.comment = new List <UpdateComment>();
         this.update.comment.Add(new UpdateComment()
         {
             add = new CommentHeader()
             {
                 body = comment
             }
         });
     }
 }
Exemplo n.º 4
0
        public Issue AddWork(Issue issue, CommentObjHeader comment, string time, DateTime fecha, Issue workIssue = null)
        {
            string key = workIssue?.key;

            if (workIssue == null)
            {
                // si no lo tengo lo busco
                var work = issue.fields.issuelinks.FirstOrDefault(obj =>
                                                                  (obj.type.id == BLL.Factory.Config.Global.Work.Clonning.IdLinkType &&
                                                                   obj.inwardIssue?.fields?.issuetype?.id == BLL.Factory.Config.Global.Work.Clonning.IdIssueType)
                                                                  );

                // si no existe, lo creo
                if (work == null)
                {
                    var obj = issue.ToIssueNew();
                    obj.fields.summary      = $"{BLL.Factory.Config.Global.Work.Clonning.SummaryPrefix}{issue.key} :: {issue.fields.summary}";
                    obj.fields.project.id   = BLL.Factory.Config.Global.Work.Clonning.IdProyect;
                    obj.fields.issuetype.id = BLL.Factory.Config.Global.Work.Clonning.IdIssueType;

                    // creo el issue
                    key = BLL.Factory.Jira.CreateIssue(obj).key;

                    // Mete el link entre issues
                    BLL.Factory.Jira.CreateLink(key, issue.key, BLL.Factory.Config.Global.Work.Clonning.IdLinkType);

                    BLL.Factory.Cache.RefreshIssue(key);
                }
                else
                {
                    key = work.inwardIssue?.key;
                }
            }

            BLL.Factory.Jira.AddWork(key, comment, time, fecha.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff'+0000'"));

            return(workIssue);
        }
Exemplo n.º 5
0
        public void IssueTransition(string issueKey, string transitionId, CommentObjHeader comment)
        {
            var data = new DTO.JiraObjs.Post.IssueTransition(transitionId, comment);

            JiraClient.Post($"issue/{issueKey}/transitions", data);
        }
Exemplo n.º 6
0
 private void AddWork(string key, CommentObjHeader comment, string time, string fecha)
 {
     base.JiraInterface.AddWork(key, comment, time, fecha);
 }
Exemplo n.º 7
0
 public void IssueTransition(string issueKey, string transitionId, CommentObjHeader comment = null)
 {
     base.JiraInterface.IssueTransition(issueKey, transitionId, comment);
 }