Skip to content

"foreach" is replaced when it shouldn't be replaced #71

@bschmalhofer

Description

@bschmalhofer

In Kernel/System/Elasticsearch.pm, formerly in Kernel/Modules/Installer.pm, there is the following data structure:

    my %Pipeline = (
        description => "Extract external attachment information",
        processors  => [
            {
                foreach => {
                    field     => "Attachments",
                    processor => {
                        attachment => {
                            target_field => "_ingest._value.attachment",
                            field        => "_ingest._value.data"
                        }
                    }
                }
            },
            {
                foreach => {
                    field     => "Attachments",
                    processor => {
                        remove => {
                            field => "_ingest._value.data"
                        }
                    }
                }
            },
        ]
    );

The CodePoliy replaces the foreach by a for, which makes no sense at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions