Example #1
0
 private static List <Milestone> GetMilestones()
 {
     return(MilestoneEngine.GetByFilter(new TaskFilter
     {
         MyProjects = true,
         MilestoneStatuses = new List <MilestoneStatus> {
             MilestoneStatus.Open
         },
         SortBy = "deadline",
         SortOrder = true
     }));
 }
        private void ReassignMilestones(Guid fromUserId, Guid toUserId)
        {
            var filter = new TaskFilter {
                UserId = fromUserId, MilestoneStatuses = new List <MilestoneStatus> {
                    MilestoneStatus.Open
                }
            };
            var milestones = MilestoneEngine.GetByFilter(filter);

            foreach (var milestone in milestones)
            {
                AddToTeam(milestone.Project, toUserId);
                milestone.Responsible = toUserId;
                MilestoneEngine.SaveOrUpdate(milestone, false);
            }
        }