group.members.sortBy[lastUpdate] not longer working after upgrading to 2.3.0-SNAPSHOT

Hi,

i’ve upgraded my openhab installation to the latest 2.3…0#1258 snapshot last night to test some new plugins but it seems that some of my rule statements don’t work with the new version.

I get some error complaints on the log for this line (which has been working so long):

	val lastSprinkler = gGarden_Irrigation_Lawn.members.sortBy[lastUpdate].last as SwitchItem

This is a part of a iteration to trigger different items based on previous triggered items.

In the log it says:

2018-04-18 08:09:53.220 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'garden.rules' has errors, therefore ignoring it: [160,60]: no viable alternative at input '[lastUpdate]'

Is this a known issue or has the syntax changed or has somebody a pointer for me where to get an idea what’s going wrong?

Thanks & Bye,
Chris

  • Platform information:
    • Hardware: x64/2 GB/ssd
    • OS: ubuntu 16.04
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: 2.3.0 build 1258

Yes, there is a breaking change (unless it will be fixed before 2.3 release) in the lambda syntax : you must insert a space after [ and another space before ], so :

val lastSprinkler = gGarden_Irrigation_Lawn.members.sortBy[ lastUpdate ].last as SwitchItem

Thank’s a lot! that fixed the issue :wink: