Example #1
0
 /// <summary>
 /// Plan the resource for an assignment
 /// </summary>
 /// <param name="str"></param>
 /// <returns></returns>
 public static void PlanForRelease(this RHumanResource person, RReleasePlanning release, Project project, Milestone milestone, Deliverable deliverable, Activity activity, Period assignedPeriod, double focusFactor)
 {
     var rep = new ResourceRepository();
     try
     {
         rep.SaveReleaseAssignment(release.Id, project.Id, person.Id, milestone.Id, deliverable.Id, activity.Id, assignedPeriod.StartDate, assignedPeriod.EndDate, focusFactor);
         // make sure we have status records for all release, project, milestone and deliverable combinations
         if (release.Milestones.Count == 0)
             release.LoadPhasesAndMilestonesAndProjects();
         release.GenerateMilestoneStatusRecords();
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Example #2
0
 public void GenerateStatusRecords(RReleasePlanning rel)
 {
     // create status records when not existing based on release configuration
     foreach (var ms in rel.Milestones)
     {
         foreach (var deliverable in ms.Deliverables)
         {
             foreach (var proj in rel.Projects)
             {
                 foreach (var act in deliverable.ConfiguredActivities)
                 {
                     if (!this.StatusRecordsExist(rel.Id, ms.Id, deliverable.Id, proj.Id, act.Id))
                     {
                         this.AddDeliverableStatusRecords(rel.Id, ms.Id, deliverable, proj.Id);
                     }
                 }
             }
         }
     }
 }