@Override
    protected void addCompletions(@NotNull CompletionParameters parameters,
                                  @NotNull ProcessingContext context,
                                  @NotNull CompletionResultSet result) {
      JqlFieldType operandType;
      boolean listFunctionExpected;
      PsiElement curElem = parameters.getPosition();
      JqlHistoryPredicate predicate = PsiTreeUtil.getParentOfType(curElem, JqlHistoryPredicate.class);
      if (predicate != null) {
        listFunctionExpected = false;
        JqlHistoryPredicate.Type predicateType = predicate.getType();
        operandType = switch (predicateType) {
          case BEFORE, AFTER, DURING, ON -> JqlFieldType.DATE;
          case BY -> JqlFieldType.USER;
          // from, to
          default -> findTypeOfField(curElem);
        };
      }
      else {
        operandType = findTypeOfField(curElem);
        listFunctionExpected = insideClauseWithListOperator(curElem);
      }
      for (String functionName : JqlStandardFunction.allOfType(operandType, listFunctionExpected)) {
        result.addElement(LookupElementBuilder.create(functionName)
          .withInsertHandler(ParenthesesInsertHandler.NO_PARAMETERS));
      }
    }
@Override
    protected void addCompletions(@NotNull CompletionParameters parameters,
                                  @NotNull ProcessingContext context,
                                  @NotNull CompletionResultSet result)