Lexpedite / blawx

A user-friendly web-based tool for Rules as Code.
MIT License
100 stars 9 forks source link

Display of Constraints in Explanations is Dependent on consistent datatype usage #489

Open Gauntlet173 opened 1 year ago

Gauntlet173 commented 1 year ago

In order to display constraints on dates and times accurately, the scenario editor is attempting to figure out what datatype each constraint relates to. It does that by checking the terms included in the model to see if the contents of the constraint have only ever been used in a single datatype.

That means that if code uses the same value both as a date and as a datetime, the scenario editor won't be able to determine what it is, and will display it as a number.

It's not a huge issue, but we can probably do better than that.

Gauntlet173 commented 1 year ago

For starters, we should default to datetime when it has been used for only date and datetime.