Skip to content

Cannot import filters when referencing other filters #205

@ldionmarcil

Description

@ldionmarcil

Description:

Steps To Reproduce:
Try to import multiple filters, where some of the filters that have references to other imported filters. None of the filters are imported. No error messages are generated.

Example filters to import:

[
    {
        "uid": "c56c5be1-2032-4301-b8b4-944f67137629",
        "name": "ok",
        "filter": {
            "filter": "Response.Status == 200"
        }
    },
    {
        "uid": "2ec0a650-b824-4cf9-b385-99e688d0c268",
        "name": "json",
        "filter": {
            "filter": "Response.Type == \"json\" AND #ok"
        }
    }
]

I think because filter #json requires filter #ok, and both get imported/parsed at the same time, the filter import logic detects filter #ok as being missing (not fully imported). As a result, nothing ends up happening. This is especially broken for me because it means I cannot export/import my filters, as none of them get imported if one of them is seen as "broken".

Expected behavior:
All filters are imported.

Version:
v3.20.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions