Rename behavior inconsistent for reference type custom parameters

Build: 2021.13610
OS: Win10

I found some major inconsistency when renaming OPs that are referenced in reference type custom parameters of Base COMPs (probably true for other COMPs as well).

Basically what it comes down to is whether you allow automatic renaming of references with the Change Parameter Constant dialog that pops up, or you manually rename OPs that are referenced by custom parameter OP fields.

If you do it automatically the references to the custom parameter fields don’t re-evaluate inside the Base COMP

In my opinion the two scenarios should result in the same correct behavior inside the COMP as on the COMP’s level the result is the same, just in different steps. This would solve many issues stemming from renames in my custom components.

Reproduction

Setup:

  • Create a Table DAT (table1)
  • Create a Base COMP (base1) with a reference type custom parameter field (e.g. DAT, label Ref),
  • Set table1 as the Ref for the custom parameter of base1
  • Inside base1 create a Select DAT, set its DAT expression to the parameter field (parent().par.Ref).

Scenario 1 (produces error):

  • Observe the Select DAT inside base1, it evaluates to /project1/table1
  • Rename table1 to table2, when prompted click Yes or Yes to All
  • Observer the Ref field of base1, it automatically changes to table2
  • Again observe the Select DAT inside base1, the expression incorrectly evaluates to /project1/table1

Rename table2 back to table1, Yes to All

Scenario 2 (no error):

  • Observe the Select DAT inside base1, it evaluates to /project1/table1
  • Rename table1 to table2, when prompted click No or No to All
  • Manually rename the Ref parameter of base1 from table1 to table2
  • Again observe the Select DAT inside base1, the expression correctly evaluates to /project1/table2

Screengrab video:

Thanks for report! Adding to the bug queue!

1 Like