Rule 5.1 Various issues

@bravenel A few things on the Datetime stuff in Rule 5.1:

  1. There is a minor bug when setting up a hub DateTime variable. The time recorded will be 1 hour off what is entered:

  2. Whilst there is a trigger for time, there is no trigger for DateTime (at least that I could find!). So if I want to have a rule trigger on a certain date at a certain time then the rule has to check every day at the time in DateTime and then have an if statement that checks if it's the correct date first.

@bravenel Whilst not related to DateTime I've found another repeatable bug in Rule 5.1:

If you try and set a parameter in a custom action to a Hub Variable you will see this screen:

This is because the date you have for that is after the change from Daylight Savings Time.

1 Like

I will investigate this.

1 Like

Maybe, but from a user experience point of view I want the datetime to be x date and y time if it changes it by one hour then that is confusing

Understood. I will look into it. DST IS confusing...

2 Likes

Found this one, a typo. Fix in next release.

2 Likes

This is fixed in Release 2.2.9.136. Please check it out.

1 Like

Thanks @bravenel That's definitely now fixed... however now I have found another bug in 5.1:

If you are as part of a conditional if statement you are checking a variable to see if it contains any text string that matches another variable... the drop down to detect the second variable to check against the first one only shows a list of 1 variable, and that is the initial variable... not any other local or hub variables (that you would want to be choosing from!):

OK, will track that down. Probably a typo...

Are you sure you have other String variables? Here's what I get:

Actually you are right this is my bad... I wanted to check for a number in the string. Is there anyway to do this... I'm guessing we don't have a to string method or something like that to make an interim string variable that I can do the comparison with?

@bravenel One other thing - not sure if I'm doing something wrong here but I just made a 5.1 rule and it won't install. Pressing the "install rule" button or "done" does not install it

Thank you!

There is a break in 136. We need to pull it, and get out a fix. Rules won't install...

2 Likes

Once we get that sorted out, yes there is a way to do this. You can use %var-name% in a string input context, such as Set Variable for a String variable. That could be a number variable, and then the string variable would be that number as a string.

Thanks - Hub Variables allow spaces in the name.. so I have done in some cases... I think that breaks the ability to insert the variable in the string:

Screenshot 2021-10-21 at 00.25.51

That works for me.

Then, I run the rule and get this:

You’re right - that all works!

I have found another bug but this one is very minor as there is an easy work around. If you are using a custom action with multiple parameters and the rule is saved (done). When you go back to it and edit the parameters the interface will show that they have been updated, but they actually won’t be…. The parameters it will use will still be the old ones. The work around is just to delete the parameters and remake them with the updated values and then it works.

@bravenel I've found another more serious issue which results in this screen:

I can replicate it... but only when making a specific rule, so I'm not exactly sure which bit is the problem so I'll just show you the whole thing:

So I get up to the end of writing this much of the rule with no issue:

Then I add a wait for event with a timeout and when I try to add that I see the error screen above. I've tried this with separate rules twice and it happens each time but I'm not sure what the exact problem is because when I try to put a wait for event with timeout into a fresh test rule (that doesn't have the rest of this rule above in it) its fine. Something about the setup above causes the crash when adding the wait event.