Пример #1
0
 public static LoadedRedmineIssue Create(RedmineIssue issue)
 {
     return(new LoadedRedmineIssue
     {
         Url = issue.Url,
         Id = issue.Id,
         ProjectId = issue.ProjectId,
         ProjectName = issue.ProjectName,
         TrackerId = issue.TrackerId,
         TrackerName = issue.TrackerName,
         StatusId = issue.StatusId,
         StatusName = issue.StatusName,
         PriorityId = issue.PriorityId,
         PriorityName = issue.PriorityName,
         AuthorId = issue.AuthorId,
         AuthorName = issue.AuthorName,
         AssigneeId = issue.AssigneeId,
         AssigneeName = issue.AssigneeName,
         Subject = issue.Subject,
         Description = issue.Description,
         StartDate = issue.StartDate,
         DueDate = issue.DueDate,
         DoneRatio = issue.DoneRatio,
         EstimatedHours = issue.EstimatedHours,
         CreationTime = issue.CreationTime,
         LastUpdateTime = issue.LastUpdateTime,
         ClosingTime = issue.ClosingTime,
         Journals = issue.Journals,
     });
 }
Пример #2
0
 private static string GetFormattedDescription(RedmineIssue issue, string format)
 {
     try
     {
         return(string.Format
                    (Regex.Unescape(format),
                    issue.Id,
                    issue.ProjectId,
                    issue.ProjectName,
                    issue.TrackerId,
                    issue.TrackerName,
                    issue.StatusId,
                    issue.StatusName,
                    issue.PriorityId,
                    issue.PriorityName,
                    issue.AuthorId,
                    issue.AuthorName,
                    issue.AssigneeId,
                    issue.AssigneeName,
                    issue.Subject,
                    issue.Description,
                    issue.StartDate,
                    issue.DueDate,
                    issue.DoneRatio,
                    issue.EstimatedHours,
                    issue.CreationTime,
                    issue.LastUpdateTime,
                    issue.ClosingTime));
     }
     catch (FormatException)
     {
         return("Invalid task description format");
     }
 }
Пример #3
0
        public void Open(RedmineIssue issue)
        {
            if (ServiceProvider == null)
            {
                return;
            }

            Open(issue.Url);
        }
        public void GetSingleTest()
        {
            var actual   = _issueImporter.GetById(1000);
            var expected = new RedmineIssue
            {
                Id      = 1000,
                Project = new RedmineIdNameObject
                {
                    Id   = 3,
                    Name = "Сайт ЦВТ"
                },

                Status = new RedmineIdNameObject
                {
                    Id   = 5,
                    Name = "Closed"
                },

                Priority = new RedmineIdNameObject
                {
                    Id   = 2,
                    Name = "Нормальный"
                },

                Author = new RedmineIdNameObject
                {
                    Id   = 13,
                    Name = "Столярова Екатерина"
                },

                AssignedTo = new RedmineIdNameObject
                {
                    Id   = 58,
                    Name = "Алексеева Валерия"
                },

                ClosedOn = new DateTime(2013, 11, 15, 8, 42, 32),

                Description = "Сейчас альтернативный текст логотипа - это название текущего раздела. А должен быть на любой странице текст \"Центр высоких технологий\". ",
                Subject     = "У логотпа неверный  альтернативный текст",
                StartDate   = new DateTime(2013, 11, 5).Date
            };

            Assert.Equal(expected.Id, actual.Id);
            Assert.Equal(expected.Subject, actual.Subject);
            Assert.Equal(expected.StartDate, actual.StartDate);
            Assert.Equal(expected.ClosedOn, actual.ClosedOn);

            AssertIdNameObject(expected.Project, actual.Project);
            AssertIdNameObject(expected.Status, actual.Status);
            AssertIdNameObject(expected.Priority, actual.Priority);
            AssertIdNameObject(expected.Author, actual.Author);
            AssertIdNameObject(expected.AssignedTo, actual.AssignedTo);
        }
Пример #5
0
        public IssueAdapterTests()
        {
            // Given
            string redmineResponse = "{\"issues\":[{\"id\":853616,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118916,\"name\":\"raj dhruw\"},\"subject\":\"media\",\"description\":\"i can't spend my site plz. \r\ncheck my site. \u003ca href=https://www.socialmediagossips.com/allison-parker/\u003e allison-parker \u003c/a\u003e\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-12-23T07:15:20Z\",\"updated_on\":\"2019-12-23T07:15:20Z\",\"closed_on\":null},{\"id\":852351,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118699,\"name\":\"cordy daymen\"},\"subject\":\"Quickbooks tech support\",\"description\":\"Quickbooks provides best accounting features for creating and managing accounts details and records for the business and firms, Quickbooks is mostly used by businessmen and professionals for there office work and in case you need any help assistance contact Quickbooks tech support and ask for Quickbooks assistance\r\nvisit us at [[https://qbsolutions.co/]]\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-12-13T10:27:45Z\",\"updated_on\":\"2019-12-13T10:27:45Z\",\"closed_on\":null},{\"id\":852350,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118699,\"name\":\"cordy daymen\"},\"subject\":\"Quickbooks tech support\",\"description\":\"Quickbooks provides best accounting features for creating and managing accounts details and records for the business and firms, Quickbooks is mostly used by businessmen and professionals for there office work and in case you need any help assistance contact Quickbooks tech support and ask for [[https://qbsolutions.co/]]\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-12-13T10:27:23Z\",\"updated_on\":\"2019-12-13T10:27:23Z\",\"closed_on\":null},{\"id\":852349,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118699,\"name\":\"cordy daymen\"},\"subject\":\"Quickbooks tech support\",\"description\":\"Quickbooks provides best accounting features for creating and managing accounts details and records for the business and firms, Quickbooks is mostly used by businessmen and professionals for there office work and in case you need any help assistance contact Quickbooks tech support and ask for [[Quickbooks assistance]https://qbsolutions.co/]\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-12-13T10:27:00Z\",\"updated_on\":\"2019-12-13T10:27:00Z\",\"closed_on\":null},{\"id\":852347,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118699,\"name\":\"cordy daymen\"},\"subject\":\"Quickbooks tech support\",\"description\":\"Quickbooks provides best accounting features for creating and managing accounts details and records for the business and firms, Quickbooks is mostly used by businessmen and professionals for there office work and in case you need any help assistance contact Quickbooks tech support and ask for [[Quickbooks assistance]]https://qbsolutions.co/\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-12-13T10:26:20Z\",\"updated_on\":\"2019-12-13T10:26:20Z\",\"closed_on\":null},{\"id\":851196,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":8,\"name\":\"In Progress\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":74416,\"name\":\"Eric Chau\"},\"assigned_to\":{\"id\":103459,\"name\":\"surendra k\"},\"subject\":\"[Front][Back] Export Data table\",\"description\":\"Provide ability to download in CSV format the tables mentioned in attached file\r\n\r\n1. When a row is expandable in the web interface, the corresponding data is stored as a json in the CSV file.\r\nFor example Merchant Transaction Log : \r\n- each row represent a Merchant Balance Order\r\n- each row will have a column *payment*, this column will be an object with Merchant Balance Payment info\r\n\r\n2. When a table has a column *status*, for example Merchant Transaction Log\r\n- use the computed status (PAID | UNPAID | REQUESTED | CANCELLED)\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-12-05T17:59:24Z\",\"updated_on\":\"2019-12-11T20:09:08Z\",\"closed_on\":null},{\"id\":849782,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":55625,\"name\":\"Александр Алексеев\"},\"assigned_to\":{\"id\":55621,\"name\":\"Kate Maksimova\"},\"subject\":\"ТЗ-1 \",\"description\":\"https://docs.google.com/document/d/1iJ9RfyCJJIKWVPZnDHYzg1zYhEsM15sY9XqMiodQI9k/edit\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":4.0,\"created_on\":\"2019-11-27T11:05:15Z\",\"updated_on\":\"2019-12-01T15:17:04Z\",\"closed_on\":null},{\"id\":849666,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"aaaa  :wNew API: create/update/delete file\",\"description\":\"Create new API for manipulations with repository\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-26T15:47:36Z\",\"updated_on\":\"2019-11-26T15:47:36Z\",\"closed_on\":null},{\"id\":849572,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"aaaa  :wNew API: create/update/delete file\",\"description\":\"Create new API for manipulations with repository\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-26T10:32:41Z\",\"updated_on\":\"2019-11-26T10:32:41Z\",\"closed_on\":null},{\"id\":849547,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"New API: create/update/delete file\",\"description\":\"Create new API for manipulations with repository\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-26T09:47:44Z\",\"updated_on\":\"2019-12-25T15:21:04Z\",\"closed_on\":null},{\"id\":849297,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-25T14:06:36Z\",\"updated_on\":\"2019-12-25T16:27:24Z\",\"closed_on\":null},{\"id\":849152,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T16:38:45Z\",\"updated_on\":\"2019-11-24T16:38:45Z\",\"closed_on\":null},{\"id\":849150,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T16:32:45Z\",\"updated_on\":\"2019-12-25T01:48:40Z\",\"closed_on\":null},{\"id\":849149,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T16:32:24Z\",\"updated_on\":\"2019-12-25T15:52:05Z\",\"closed_on\":null},{\"id\":849145,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T15:51:04Z\",\"updated_on\":\"2019-11-24T15:51:05Z\",\"closed_on\":null},{\"id\":849143,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T15:32:12Z\",\"updated_on\":\"2019-11-25T14:06:38Z\",\"closed_on\":null},{\"id\":849141,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T15:27:38Z\",\"updated_on\":\"2019-11-24T15:27:38Z\",\"closed_on\":null},{\"id\":849140,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T15:26:24Z\",\"updated_on\":\"2019-11-24T15:26:24Z\",\"closed_on\":null},{\"id\":849130,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T14:33:39Z\",\"updated_on\":\"2019-11-24T15:30:12Z\",\"closed_on\":null},{\"id\":849129,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T14:32:26Z\",\"updated_on\":\"2019-11-24T14:32:26Z\",\"closed_on\":null},{\"id\":849128,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"this is a test title\",\"description\":\"this is my description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T14:32:02Z\",\"updated_on\":\"2019-11-24T14:32:02Z\",\"closed_on\":null},{\"id\":849127,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"first subject\",\"description\":\"description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T14:29:30Z\",\"updated_on\":\"2019-11-24T14:29:30Z\",\"closed_on\":null},{\"id\":849114,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":4,\"name\":\"Normal\"},\"author\":{\"id\":118217,\"name\":\"River Lin\"},\"subject\":\"first subject\",\"description\":\"description\",\"start_date\":null,\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-24T13:33:48Z\",\"updated_on\":\"2019-11-24T13:33:48Z\",\"closed_on\":null},{\"id\":846973,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":5,\"name\":\"High\"},\"author\":{\"id\":117830,\"name\":\"John Depp\"},\"subject\":\"Spirit Airlines Reservations Number\",\"description\":\"Hello friends my name is John Depp. I am working in Spirit Airlines Reservations Numbers. Our company provide you best reservation service.  For any flight booking related query call at spirit airlines reservations Number. Our executives provide you best services. Our services are available 24/7 via toll free Number.http://spirit.airlinesreservationsnumbers.com\",\"start_date\":\"1990-03-20\",\"due_date\":null,\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-13T06:29:49Z\",\"updated_on\":\"2019-11-13T06:29:49Z\",\"closed_on\":null},{\"id\":846262,\"project\":{\"id\":1869,\"name\":\"TestCreditSystem\"},\"tracker\":{\"id\":4,\"name\":\"Task\"},\"status\":{\"id\":1,\"name\":\"New\"},\"priority\":{\"id\":5,\"name\":\"High\"},\"author\":{\"id\":74279,\"name\":\"Alexander Rudenko\"},\"assigned_to\":{\"id\":74279,\"name\":\"Alexander Rudenko\"},\"subject\":\"Buy and hang TV bracket on the wall\",\"description\":\"1. Find a TV bracket having appropriate price and quality.\r\n2. Buy it.\r\n3. Measure the TV set dimensions.\r\n4. Hang it on the wall.\",\"start_date\":\"2019-11-08\",\"due_date\":\"2019-11-30\",\"done_ratio\":0,\"is_private\":false,\"estimated_hours\":null,\"created_on\":\"2019-11-07T21:25:37Z\",\"updated_on\":\"2019-11-07T21:44:18Z\",\"closed_on\":null}],\"total_count\":199,\"offset\":0,\"limit\":25}";

            RedmineIssue redmineIssue = JsonConvert.DeserializeObject <RedmineIssue>(redmineResponse);

            this.adaptee = redmineIssue;

            // When
            IssueAdapter adapter = new IssueAdapter();

            this.expectedIssue = adapter.GetIssue(this.adaptee.Issues.First());
        }
        private void Initialize(RedmineIssue issue)
        {
            if (issue == null)
            {
                throw new ArgumentNullException("issue");
            }

            _issue    = issue;
            _journals = issue.Journals == null
                ? new RedmineJournalViewModel[0]
                : issue.Journals
                        .Where(x => x.Notes != null && x.Notes.Length > 0)
                        .Select(x => new RedmineJournalViewModel(x)).ToArray();
        }
Пример #7
0
        public RedmineTask(RedmineIssue issue, string format)
        {
            CanDelete = false;
            Checked   = false;

            IsCheckedEditable  = false;
            IsPriorityEditable = false;
            IsTextEditable     = false;

            ImageIndex = 2;

            Category = TaskCategory.Misc;
            Document = issue.ProjectName;

            // Visual Studio shows line numbers incremented by 1
            Line = issue.Id - 1;

            Priority = (TaskPriority)Math.Max(3 - issue.PriorityId, 0);
            Text     = GetFormattedDescription(issue, format);
        }
Пример #8
0
        private void GetIssues(ConnectionSettings settings)
        {
            var issues  = new RedmineIssue[0];
            var redmine = GetRedmineService(settings, _proxy);

            try
            {
                issues = redmine.GetIssues(settings.Query);
            }
            catch (Exception e)
            {
                if (Debug != null)
                {
                    Debug.WriteLine(String.Concat("Username: "******"; URL: ", redmine.BaseUriString, settings.Query));
                    Debug.WriteLine(e.ToString());
                }
            }

            lock (syncRoot)
            {
                _issuesBySource.Add(settings, issues);
            }
        }
Пример #9
0
 public void Dispose()
 {
     this.adaptee = null;
 }
 public RedmineIssueViewModel(RedmineIssue issue)
 {
     Initialize(issue);
 }