public List<SelectItem> getTaksForUpdate() {

    Customer customer = this.entity.getCustomer();
    tasks = taskService.findByCustomer(customer, StatusEnum.READY_FOR_UPGRADE, StatusEnum.CLOSED);

    return constantControler.prepareList(tasks, "title", false);
  }
  @Override
  public void saveOrUpdateEntity() {

    if (entity.getId() == null) {
      entity.setIsCompleted(false);
      entity.setDate(new Date());
      entity.setUser(getLoggedUser());

      getService().save(entity);

      Status status = statusService.findById(StatusEnum.CLOSED.getValue());
      for (Task task : tasks) {
        task.setUpgrade(entity);
        taskService.update(task);
      }
    } else {
      getService().update(entity);
    }

    reloadList();
    clear();
  }