I have webhooks on all the lists on a board and most cases I get the expected result. On one list (maybe more, I didn't check them all) the action.data.listBefore and action.data.listAfter properties are missing.
Fortunately I only care about the list after which is also on the action.data.card so I worked around it. If I ever care about the list the card was move from then I'm toast.
Has anyone else stumbled on this?
Forget to mention. I did delete and recreate the webhook. No change.
I didn't fully research this answer, but I have a thought on what is going on.
I have webhooks on every list on the board so when moving a card between lists I get two events, one from the list it's leaving and one from the list getting the card. I suspect that the event of leaving the list might have less data on it - before and after are meaningless concepts.
My bad for not tuning into the two events. Maybe if someone else is getting confusing results this might help out.
@Ted Mead The before and after data will depend on the idModel you defined for the webhook. It is not always the case you find the before and after list it the change does not involve a card movement. Typically in use idModel = List to watch movement into the list and I will check the card listname with the listAfter before do the downstream processing. Where I can I try not to use idModel = board_id - it creates a flood of raw data to process at the end point.
Also note that card actions (no movement like commentCard) on list that you have set will trigger data at the endpoint. You need to filter those as mentioned above.
Furthermore, the Low code platform has triggers and I used py-Trello if required for more complex processing.
Thanks for the explanation, although I am quite sure I have the list id as the idModel (in fact all the webhooks on the board are handled programmatically, so all have the same logic). All (most? I didn't check them all) work as you describe. For some reason that I assume is a Trello bug, this one webhook never returns listBefore/listAfter on a card move.
Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events