[2.3.0.119 C7] Cut/Paste Nested IF Corrupted rule

I wanted to add a small number of "nested IF/then/else" statements near the top of a RM5 (Version 5.1.1 (11/28/2021)) rule.

To avoid having to do several "Insert before" actions, I added them to the bottom of the rule and tried to use the "Cut/Paste" operation to move the set of them from the bottom into the place I wanted them at the top of the rule.

Under "Cut", I selected all of the lines--then pasted them "before" the location where I wanted them.

At that point, the editor UI blew up with an "Unexpected Error" and the log showed:

From that point on, I got the same error every time I tried to open that rule in the edit mode (I was able to open the rule itself in "view" mode, but when I clicked on the actions to edit it, it blew up).

I had to restore the hub to the last backup to recover the working rule (costing over an hour of wasted time, as I lost edits on the RM4 rule as well :frowning: ) , so I'll have to repeat all these changes manually again some other day (but NOT do the cut/paste, I suppose).

I lost the text of what I was trying to move in the RM 5 rule--but it was essentially the same as this (copied from a similar RM4 rule):

IF (NOAA Weather Alert Device EventType(-) contains Tornado(F) OR
NOAA Weather Alert Device EventType(-) contains Tropical Storm(F) OR
NOAA Weather Alert Device EventType(-) = Storm Warning(F) OR
NOAA Weather Alert Device EventType(-) contains Volcano(F) OR
NOAA Weather Alert Device EventType(-) contains Severe Thunderstorm(F) OR
NOAA Weather Alert Device EventType(-) contains Hurricane(F) OR
NOAA Weather Alert Device EventType(-) contains Earthquake(F) OR
NOAA Weather Alert Device EventType(-) = Storm Watch(F) [FALSE]) THEN
Set TempLevel to NOAA Weather Alert Device Level
ELSE-IF (NOAA Weather Alert Device Level(-) != -(F) AND
NOT NOAA Weather Alert Device Level(-) is empty is empty(T) [FALSE]) THEN
Set TempLevel to 'Other'
ELSE
Set TempLevel to '-'
END-IF

I think this report falls into the same category as the one I filed last weekend, namely:
BUG: Editing a Copied-and-Pasted action in RM breaks it

In which case, @bravenel is aware of complications with the Cut-and-Paste feature, but hasn't yet rolled out a fix (that I know of).

1 Like

Looks like .120 has a fix!

1 Like

Download the Hubitat app