Skip to content

fix field names when processing delayed action

JonGold requested to merge JonGold/civirules:better-delayed-fieldnames into master

This fixes a regression introduced in !238 (merged).

!238 (merged) improves delayed actions by using the data as it currently exists, rather than the data as it was when the record was saved. It does this with an API3 call. However, the trigger data on non-delayed actions uses canonical field names, whereas API3 returns unique field names. E.g. the canonical source field on Contributions becomes contribution_source.

This MR uses the getFields API3 action to build a lookup table of unique and canonical fieldnames, and substitutes one for the other when necessary.

@konadave see if this works for you?

Merge request reports

Loading