Coming from #2654892: Allow using data filters in placeholder tokens:

The 'default' filter can currently only filter on strings, so node:title is not a valid input while node:title:value would be. As we can convert everything to strings via $typed_data->getString() we should probably implement some logic that invokes that function for filters that need string input.

Thus, we need to check whether the next filter input accepts the data of the current type, if not try it again with a string. If that works, auto-convert it via getString().

Comments

fago created an issue. See original summary.

dasjo’s picture

TR’s picture

Title: Datafilter: Auto-convert filter input to string if necessary » Auto-convert filter input to string if necessary
Project: Rules » Typed Data API enhancements
Version: 8.x-3.x-dev » 8.x-1.x-dev
Component: Rules Core » Data filters

I guess this should be a TypedData issue now that data filters have been moved over there ...

TR’s picture

Version: 8.x-1.x-dev » 2.0.x-dev