/**
  * Returns an unsaved copy of the milestone. Copies everything except open/closed state,
  * anything that needs the task to have an id (like tags, properties, tasks),
  * administrative info like who created the milestone and when, etc.
  *
  * @param ProjectMilestone $milestone
  * @return ProjectMilestone
  */
 function createMilestoneCopy(ProjectMilestone $milestone)
 {
     $new = new ProjectMilestone();
     $new->setName($milestone->getName());
     $new->setDescription($milestone->getDescription());
     $new->setIsPrivate($milestone->getIsPrivate());
     $new->setIsUrgent($milestone->setIsUrgent());
     $new->setAssignedToCompanyId($milestone->getAssignedToCompanyId());
     $new->setAssignedToUserId($milestone->getAssignedToUserId());
     $new->setDueDate($milestone->getDueDate());
     return $new;
 }