private Task<?> getParent(Set<Related<Task<?>>> relationships)
  {
    Task<?> potentialParent = null;
    for(Related<Task<?>> related : relationships)
    {
      if (related.getRelationship().equals(Relationship.CHILD_OF.name()))
      {
        return related.getRelated();
      }
      else if (related.getRelationship().equals(Relationship.POTENTIAL_CHILD_OF.name()))
      {
        potentialParent = related.getRelated();
      }
    }
    return potentialParent;
  }