open-scd icon indicating copy to clipboard operation
open-scd copied to clipboard

Name check in checkUpdateValidity cause strange behaviour when using complex action

Open dlabordus opened this issue 2 years ago • 3 comments

In the Substation Wizard we now use the Update Action to change the element instead of Replace Action. The Update Action will hold all attributes that need to be preserve, including the name attribute. There is already a check added to checkUpdateValidity (Editing.ts) to only check the name in case they are different (old <-> new).

When the check is executed and the same name is already used this is nicely logged in OpenSCD. But also the Complex Action is logged, saying that the Substation has been updated.

Reproduct:

  • Open a SCD File in OpenSCD with at least 2 substations (or create a new one)
  • Change the name of the first substation in the same name used for the second substation
  • Updating fails, but a log entry saying the Substation is updated is also visible.

dlabordus avatar Apr 05 '22 12:04 dlabordus