Skip to content

use helper class SetOps for a cleaner version of ContactHasTag

sebalis requested to merge sebalis/action-provider:contacthastag-rework into master

This MR makes ContactHasTag use the SetOps helper class that came with my first implementation of ContactIsInGroup. The actual logic is unchanged. This includes the “special” behaviour for the case when operator is “has all tags” and no tags are specified, where in theory the condition should always be true but in the implementation it is always false.

I am submitting this MR because a) I think it makes the code clearer and the helper class SetOps could be helpfor in other places too (I haven’t checked) and b) I am next going to sumbit a MR that changes the way that “Contact is in Group” calculates its results completely (in order to make it work for dynamic groups as well) and this will no longer require set operations, using API calls instead; so I’m hoping to make my previous work useful in another place :-)

Merge request reports

Loading