docs: public static Status assignOwnerAndStatus(InternalTaskData taskData, List<OrganizationalEntity> potentialOwners) {
          if (taskData.getStatus() != Status.Created) {
              throw new PermissionDeniedException("Can only assign task owner if status is Created!");
          }
  
          Status assignedStatus = null;
  
          if (potentialOwners.size() == 1) {
              // if there is a single potential owner, assign and set status to Reserved
              OrganizationalEntity potentialOwner = potentialOwners.get(0);
              // if there is a single potential user owner, assign and set status to Reserved
              if (potentialOwner instanceof User) {
                  taskData.setActualOwner((User) potentialOwner);
                  assignedStatus = Status.Reserved;
              }
              //If there is a group set as potentialOwners, set the status to Ready ??
              if (potentialOwner instanceof Group) {
                  assignedStatus = Status.Ready;
              }
          } else if (potentialOwners.size() > 1) {
              // multiple potential owners, so set to Ready so one can claim.
              assignedStatus = Status.Ready;
          } else {
              //@TODO we have no potential owners
          }
  
          if (assignedStatus != null) {
              taskData.setStatus(assignedStatus);
          } else {
              // status wasn't assigned, so just return the currrent status
              assignedStatus = taskData.getStatus();
          }
  
          return assignedStatus;
      }