public SprintCommandHandler(SprintRepository sprintRepository, ISprintFactory sprintFactory, ISprintSearcher sprintSearcher, IIssueSearcher issueSearcher)
 {
     this.sprintRepository = sprintRepository;
     this.sprintFactory    = sprintFactory;
     this.sprintSearcher   = sprintSearcher;
     this.issueSearcher    = issueSearcher;
 }
Exemple #2
0
 public BugCommandHandler(BugRepository bugRepository, IIssueFactory issueFactory, ILabelsSearcher labelsSearcher, IMembershipService authorizationService, UserRepository userRepository, ISprintSearcher sprintSearcher, CallContext callContext)
 {
     this.bugRepository        = bugRepository;
     this.issueFactory         = issueFactory;
     this.labelsSearcher       = labelsSearcher;
     this.authorizationService = authorizationService;
     this.userRepository       = userRepository;
     this.sprintSearcher       = sprintSearcher;
     this.callContext          = callContext;
 }
Exemple #3
0
 public NfrCommandHandler(NfrRepository nfrRepository, IIssueFactory issueFactory, ProjectRepository projectRepository, ILabelsSearcher labelsSearcher, IMembershipService authorizationService, UserRepository userRepository, ISprintSearcher sprintSearcher, CallContext callContext)
 {
     this.nfrRepository        = nfrRepository;
     this.issueFactory         = issueFactory;
     this.projectRepository    = projectRepository;
     this.labelsSearcher       = labelsSearcher;
     this.authorizationService = authorizationService;
     this.userRepository       = userRepository;
     this.sprintSearcher       = sprintSearcher;
     this.callContext          = callContext;
 }
Exemple #4
0
 public TaskCommandHandler(TaskRepository taskRepository, IIssueFactory taskFactory, ProjectRepository projectRepository, ILabelsSearcher labelsSearcher, IMembershipService authorizationService, UserRepository userRepository, ISprintSearcher sprintSearcher, IBugMapper bugMapper, CallContext callContext)
 {
     this.taskRepository       = taskRepository;
     this.taskFactory          = taskFactory;
     this.projectRepository    = projectRepository;
     this.labelsSearcher       = labelsSearcher;
     this.authorizationService = authorizationService;
     this.userRepository       = userRepository;
     this.sprintSearcher       = sprintSearcher;
     this.bugMapper            = bugMapper;
     this.callContext          = callContext;
 }
        public async Task StartSprint(ISprintSearcher sprintSearcher)
        {
            if (Status != SprintStatus.Planned)
            {
                throw new CannotChangeSprintStatus(Id, Status, SprintStatus.InProgress, DomainInformationProvider.Name);
            }

            var sprints = await sprintSearcher.GetSprints(ProjectId);

            if (sprints.Any(x => x.Status == SprintStatus.InProgress))
            {
                throw new CannotStartSprintWhenAnyOtherIsNotFinished(Id);
            }

            var currentDate = DateTime.UtcNow.Date;

            if (StartDate.Date != currentDate)
            {
                StartDate = currentDate;
            }

            Status = SprintStatus.InProgress;
            Update(new SprintStarted(Id, Status, StartDate));
        }
Exemple #6
0
        public override async System.Threading.Tasks.Task AssignToSprint(Guid sprintId, ISprintSearcher sprintSearcher)
        {
            await base.AssignToSprint(sprintId, sprintSearcher);

            Update(new BugAssignedToSprint(Id, SprintId.Value));
        }
Exemple #7
0
        public async System.Threading.Tasks.Task AssignSubtaskToSprint(Guid subtaskId, Guid sprintId, ISprintSearcher sprintSearcher)
        {
            var subtask = GetSubtaskWithId(subtaskId);
            await subtask.AssignToSprint(sprintId, sprintSearcher);

            Update(new SubtaskAssignedToSprint(subtask.Id, sprintId));
        }
Exemple #8
0
        public async System.Threading.Tasks.Task AssignBugToSprint(Guid bugId, Guid sprintId, ISprintSearcher sprintSearcher)
        {
            var bug = Bugs.Single(x => x.Id == bugId);
            await bug.AssignToSprint(sprintId, sprintSearcher);

            Update(new BugAssignedToSprint(bug.Id, sprintId));
        }
Exemple #9
0
        public virtual async System.Threading.Tasks.Task AssignToSprint(Guid sprintId, ISprintSearcher sprintSearcher)
        {
            await sprintSearcher.CheckIfSprintExistsInProjectScope(sprintId, ProjectId);

            SprintId = sprintId;
        }
 public SprintQueryHandler(ISprintSearcher sprintSearcher, IRepository <Sprint> repository)
 {
     this.sprintSearcher = sprintSearcher;
     this.repository     = repository;
 }