A Very Odd Bug in :merged with Operator

Just following up on my own report: I didn’t realize this as I hadn’t inspected the problem data set fully, but it turns out what I’m seeing is expected Bubble behavior.

The list(s) that do not merge correctly are lists that contain duplicate values. These values are sourced from an API and so, until touched by Bubble can and may contain duplicate values. (In this case, we are talking about lists of start dates and lists of end dates that represent booking start/end [check-in / check-out] pairs.)

The :merged with operator in performing the merge operation “Bubble-izes” the lists and, as expected, removes duplicates. But in this case that can break the expected pairing between these starts and ends.

Of course, it is entirely possible for such lists to contain duplicate values. As an example: The pair at position 1 in the list might represent 5/22/2019 to 5/25/2019. The pair at position 10 might represent 5/22/2019 to 5/30/19.

When processed with a Bubble list operator those 2 instances of 5/22/2019 will collapse into a single list entry.

So, not a bug, but expected behavior (I simply did not realize that these particular lists would sometimes contain duplicate values at different positions) that I need to work around.

(I did turn the bug report into a request for enhancement – it would be handy to have optional list operators that don’t result in de-duplication. Of course, I have workarounds for this, but ideally one desires these as operators, not as element/action/server-side-action plugins. Also, why is there no API for operator plugins, eh?)

1 Like