private (Status, BacklogEvalQueryResult) EvalSubmissions(string backlogId)
        {
            var(status, submissions) = _backlogrepo.ReadSubmissions(backlogId);
            if (status is Failure)
            {
                return(status, null);
            }

            int[] currentOrder = _totalorder.Order(submissions);

            var(status2, backlog) = _backlogrepo.ReadBacklog(backlogId);
            if (status2 is Failure)
            {
                return(status2, null);
            }

            return(new Success(), new BacklogEvalQueryResult
            {
                Id = backlogId,
                Title = backlog.Title,
                UserStories = applyOrder(backlog.UserStories, currentOrder),
                NumberOfSubmissions = submissions.Length,
                OneVotePerUser = backlog.OneVotePerUser
            });
        }
Beispiel #2
0
        private BacklogEvalQueryResult EvalSubmissions(string backlogid)
        {
            var submissions = _backlogrepo.ReadSubmissions(backlogid);

            int[] currentOrder = _totalorder.Order(submissions);
            var   backlog      = _backlogrepo.ReadBacklog(backlogid);

            return(new BacklogEvalQueryResult
            {
                Id = backlogid,
                Title = backlog.Title,
                UserStories = applyOrder(backlog.UserStories, currentOrder),
                NumberOfSubmissions = submissions.Length
            });
        }