Esempio n. 1
0
        public void GetAllProjects_WithAll_AssociatedData()
        {
            IList <Project> result = redmineManager.GetTotalObjectList <Project>(new NameValueCollection()
            {
                { "include", "trackers, issue_categories, enabled_modules" }
            });

            Assert.IsNotNull(result);
        }
Esempio n. 2
0
        public static IList <Issue> GetTicketList(string reportId, string projUrl, string apikey)
        {
            var manager = new RedmineManager(projUrl, apikey)
            {
                PageSize = 100
            };
            var parameters = new NameValueCollection {
                { "query_id", reportId }
            };

            return(manager.GetTotalObjectList <Issue>(parameters));
        }
Esempio n. 3
0
        private static bool GetProjectDetailsIfNeeded(Configuration configuration)
        {
            if (configuration.OpenTickets)
            {
                try
                {
                    _project        = _redmineManager.GetObject <Project>(configuration.Project, null);
                    _projectMembers =
                        _redmineManager.GetTotalObjectList <ProjectMembership>(new NameValueCollection
                    {
                        { "project_id", _project.Identifier }
                    }).Select(p => p.User).ToList();
                    return(_projectMembers != null && _projectMembers.Any());
                }
                catch (RedmineException)
                {
                    return(false);
                }
            }

            return(true);
        }