When I've been developing some automations for both Points, Achievements, and General Automations, I've found that any rules I put in <propertyRules> are ignored when saving the configuration.
Here's a really basic example which has a number (int) field.. it has a min/max of 1-5. When I use the exact same dynamic config in a widget, I save the widget config & it correctly changes the number so that it falls within the range, e.g. I enter 7, and it'll save it as 5.
This doesn't happen when I save the configuration of an automation
Example Automation
<automation name="e14 - Temp to delete automation" version="11.1.8.16788" description="" id="689b8eab6dc0483aa200c1196f7aa52f" executeAsServiceUser="false" isSingleton="false" hostId="20621367a4734f92abef8dc33fa32a5b" trigger="Http" httpAuthentication="Rest" lastModified="2021-11-25 17:15:36Z" provider="00e14000-0e14-0e14-0e14-100000000e14"> <executionScript language="JavaScript"><![CDATA[core_v2_eventLog.Write(core_v2_widget.GetIntValue("mynumber", 0), { Category: "Testing", EventId: 1, EventType: "Information" });]]></executionScript> <configuration><![CDATA[<propertyGroup id="group1" resourceName="Main"> <property id="mynumber" dataType="int" labelText="My Number"> <propertyRule name="minmax" min="1" max="5" /> </property> </propertyGroup>]]></configuration> </automation>
Example Widget
<scriptedContentFragments> <scriptedContentFragment name="e14 - Temp to delete" version="11.1.8.16788" description="" instanceIdentifier="f7e742dae1424f64beeef694dd8b37aa" theme="" isCacheable="false" varyCacheByUser="false" showHeaderByDefault="true" cssClass="" lastModified="2021-11-25 17:11:49Z" provider="00e140000e140e140e14000000000e14"> <contentScript language="Velocity"><![CDATA[Hi. $core_v2_widget.GetIntValue("mynumber", 0)]]></contentScript> <headerScript language="Velocity" /> <configuration><![CDATA[<propertyGroup id="group1" resourceName="Main"> <property id="mynumber" dataType="int" labelText="My Number"> <propertyRule name="minmax" min="1" max="5" /> </property> </propertyGroup> ]]></configuration> <additionalCssScript language="Velocity" /> </scriptedContentFragment> </scriptedContentFragments>
Is this a known-issue? Or something I'm doing wrong?
Thanks!