Xtend Scripts vs JSR223?

Thanks. The fourth/fifth example is exactly how I wanted to write the rule but I didn’t realise you could get a list of the groups an item was in. Where is the best place to get a list of what function/properties I can use in Xtend. I was just going off the group properties in the following post post so I didn’t realise I could do what I wanted. Design Pattern: Working with Groups in Rules.

I’ll try and implement your rule and also write a python equivalent.