/**
  * Put children in a given milestone
  *
  * Put the new children of a given milestone.
  *
  * @url PUT {id}/milestones
  *
  * @param int $id    Id of the milestone
  * @param array $ids Ids of the new milestones {@from body}
  *
  * @throws 400
  * @throws 403
  * @throws 404
  */
 protected function putSubmilestones($id, array $ids)
 {
     $user = $this->getCurrentUser();
     $milestone = $this->getMilestoneById($user, $id);
     try {
         $this->milestone_validator->validateSubmilestonesFromBodyContent($ids, $milestone, $user);
     } catch (IdsFromBodyAreNotUniqueException $exception) {
         throw new RestException(400, $exception->getMessage());
     } catch (SubMilestoneAlreadyHasAParentException $exception) {
         throw new RestException(400, $exception->getMessage());
     } catch (ElementCannotBeSubmilestoneException $exception) {
         throw new RestException(400, $exception->getMessage());
     } catch (UserCannotReadSubMilestoneException $exception) {
         throw new RestException(403, $exception->getMessage());
     } catch (UserCannotReadSubMilestoneException $exception) {
         throw new RestException(403, $exception->getMessage());
     } catch (SubMilestoneDoesNotExistException $exception) {
         throw new RestException(404, $exception->getMessage());
     }
     try {
         $this->artifactlink_updater->update($ids, $milestone->getArtifact(), $user, new FilterValidSubmilestones($this->milestone_factory, $milestone));
     } catch (ItemListedTwiceException $exception) {
         throw new RestException(400, $exception->getMessage());
     } catch (Tracker_NoChangeException $exception) {
         //Do nothing
     }
     $this->sendAllowHeaderForSubmilestones();
 }