Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the merge function of the mutate filter #166

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnmschoonover
Copy link

The dest_field_value was derived before the added fields were iterated upon. This caused the subsequent event.set's, when iterating over multiple added_field_value's, to set the dest_field based on the initial dest_field_value.

The logic should, instead, update the dest_field_value on each iteration of added_field so that it may continue to add to the dest_field_value instead of always only adding the last item in the list.

Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/

The dest_field_value was derived before the added fields were iterated upon. This caused the subsequent `event.set`'s, when iterating over multiple `added_field_value`'s, to set the `dest_field` based on the _initial_ `dest_field_value`. 

The logic should, instead, update the `dest_field_value` on each iteration of `added_field` so that it may continue to add to the `dest_field_value` instead of always only adding the last item in the list.
@cla-checker-service
Copy link

cla-checker-service bot commented May 1, 2023

💚 CLA has been signed

@johnmschoonover
Copy link
Author

I have signed the contributor agreement

@TotalKnob
Copy link

TotalKnob commented May 26, 2023

I concluded the same and opened issue #167 and a PR including tests #168

@johnmschoonover
Copy link
Author

Awesome, thanks much!

Pls don't hesitate to LMK if further work/assistance is needed to get this resolved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants