Group:DateTime:MIN not displayed in sitemap

In Rules DSL a map/reduce would work I think. Something like:

var oldestDT = MyDateTimes.members.map[(state as DateTimeType).zonedDateTime].reduce[oldest, curr | oldest = if(curr.isBefore(oldest)) curr else oldest]

In Python:

oldestDT = reduce(lambda: oldest, curr: oldest = curr if curr.isBefore(oldest) else oldest,
                  [items[dt.name].getZonedDateTime() for dt in ir.getItem("MyDateTimes")])

I just typed in the above two lines, there may be typos, especially in the Python verison. See Design Pattern: Working with Groups in Rules for details.

1 Like