Skip to content

Comparisons broken from residual newline character #136

@danyill

Description

@danyill

I've been finding on a comparison that clicking "Compare" does nothing:

Image

Looking at my browser console:

Image

Then exporting the rule and studying it, I find this:

"Full Compare for Ohangai DTT Diagnosis": {
      "description": "Compare a specific IED (requires user modification)",
      "ourSelector": "\n",
      "theirSelector": "",
      "selectors": {
        "inclusive": false,
        "vals": [
          "DAI[name=\"setSrcRef\"]",
          "LN[lnClass=\"LGOS\"]",
          "LN[lnClass=\"LSVS\"]",
          "Private"
        ],
        "except": []
      },
      "attributes": {
        "inclusive": false,
        "vals": [
          "desc",
          "LN0.lnType",
          "LN.lnType",
          "LNodeType.id",
          "DO.type",
          "SDO.type",
          "DA.type",
          "BDA.type",
          "DAType.id",
          "EnumType.id",
          "FCDA.prefix",
          "RptEnabled.max"
        ],
        "except": []
      },
      "namespaces": {
        "inclusive": false,
        "vals": [],
        "except": []
      }
    }

Note in particular that ourSelector is a newline character. When I remove the newline, import the filter, reload the plugin and try the same rule, it functions correctly. Prior to this I had only modified this rule in the UI so we must somehow not chomp the newline characters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions