Graylog2 / Graylog2/graylog2-server

Unusual final value (or additional suggestion) after accepting suggested value while inside quotes

Open
#13,186 0 comments 0 reactions 1 assignee Claimed by @dennisoelkers View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Expected Behavior

When accepting a suggested value with the cursor inside a quotation marks-surrounded field value, the accepted value should completely replace the existing value in the quoted string.

Additionally, there should not be another suggestion immediately after accepting the suggested value.

## Current Behavior

In certain scenarios accepting the suggested value for a quoted string results in the suggested value being appended to the existing value (e.g. accepting `10.1.2.3` for `source:"10.1"` results in `source:"10.10.1.2.3"`).

Additionally, if I do a variation of the above, accepting `10.1.2.3` for `source:"10"` to get `source:"10.1.2.3"`, I immediately see a new suggestion that seems to assume a prefix of `10.1.2.` is in place (due to coloring on the suggested value).

Neither of these occur if the value is unquoted, so this seems to be related to #13087.

## Steps to Reproduce (for bugs)

1. Have messages with a suggestible field that contains periods (e.g. an IP address)
2. Try various quoted queries (see examples above) with varying value prefixes, accepting the suggestions

## Context

Testing 4.3.4, but there might be cases where users run into this.

## Your Environment

* Graylog Version: 4.3.4
* Browser version: Firefox 103, Chrome 104

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.