Update: added simple page that reproduces this bug: see bug app or bug editor.
Seems like this is a critical bug, unless I’m missing something…
For an RG that’s sorted and allows for a change of the field that the sort is based upon, a triggered workflow will sometimes use or act upon the wrong cells’ data! Seems like the sort/resort causes some confusion in the Bubble engine?
Steps to reproduce (using bug sample app):
- https://gcdemo01.bubbleapps.io/version-test/bug01?debug_mode=true
- sort by last name
- change a bunch of “enabled” fields for various cells; notice the yellow highlighted box that indicates the last cell that you’ve acted upon is correct.
- sort by “enabled?”
- change a bunch of “enabled” fields for various cells; notice the yellow highlighted box that indicates the last cell that you’ve acted upon is INCORRECT.
- NOTE: This yellow group always displays the last user acted upon in the RG below (in a workflow for on change of “Enabled?”). When the RG is sorted by “Enabled?” we can see the bug (which seems to stem from Bubble first doing a resort of the RG, and only then the workflow actions act on the OLD “current cell’s” position, which has since changed because of the sort!) When sorted by name, the issue does not happen.
Steps to reproduce (from scratch without bug sample app):
- Add field “Enabled?” (yes/no) to Users thing.
- Create RG for Users, sort by “Enabled?” field and include the “Enabled?” field as a toggle, with binding to the DB’s field (with requisite privacy permissions).
- Add simple workflow, triggered upon change of “Enabled?” that creates a new thing in a Log thing with the user’s email address and the “Enabled?” value.
- Make some changes in the “Enabled?” field for various users and check the Log as you make those changes. You’ll notice that there will be many cases where the user logged is NOT the user where you flipped the “Enabled?” field!
Important: This issue does not happen if I turn off the RG sort on “Enabled?” – presumably because the bug is related to the repositioning of the item in the RG and the workflows. The bug demo app indicates that this issue seems to stem from Bubble first doing a resort of the RG, and only then the workflow actions act on the OLD “current cell’s” position, which has since changed because of the sort!)
I’ve experienced the same issue with workflows updating fields of the changed thing but the updates happened to a different record altogether.
Thanks much in advance for any & all advice/feedback.
Best,
Andy