Пример #1
0
        public static SprintInfoList SprintFetchInfoList(IProject project)
        {
            ProjectUserRepository.AuthorizeProjectUser(project.ProjectId);

            return(SprintInfoList.FetchSprintInfoList(
                       new SprintDataCriteria
            {
                ProjectId = new[] { project.ProjectId }
            }));
        }
Пример #2
0
        public static SprintInfoList SprintFetchInfoList(IProject[] projects, bool?isArchived)
        {
            var projectIds = projects.Select(row => row.ProjectId).ToArray();

            ProjectUserRepository.AuthorizeProjectUser(projectIds);

            return(SprintInfoList.FetchSprintInfoList(
                       new SprintDataCriteria
            {
                ProjectId = projectIds,
                IsArchived = isArchived
            }));
        }
        protected override void Execute(RuleContext context)
        {
            var target   = (ISprint)context.Target;
            var projects = SprintInfoList.FetchSprintInfoList(new SprintCriteria
            {
                ProjectId = target.ProjectId,
                Name      = target.Name
            });

            if (projects.Count(row => row.SprintId != target.SprintId) != 0)
            {
                context.AddErrorResult("That sprint name is already in use.");
            }
        }
Пример #4
0
 public static SprintInfoList SprintFetchInfoList(SprintDataCriteria criteria)
 {
     return(SprintInfoList.FetchSprintInfoList(criteria));
 }