How could the description change without an action being recorded?

Hi there, I have a function that triggers when the description on a card is updated, and it parses some email content and updates the description.

Later, another description change is recorded, however the “old” desc showing in the action is not the one it was updated to previously – that is to say that somehow the description has changed but no action shows that change. Here is a screenshot showing the actions to update the card description:

Can you share a bit more context on the setup of what you’re doing?

Is this backed by a Trello webhook? Or are you doing some sort of GET polling? Or something else?

In the screenshot, is that the response of a GET to an /actions endpoint?

Hey Bentley, thanks for getting back to me. Yep this is a webhook:

The screenshot I’m showing is from the JSON output of the card:

So regardless of how my system is handling the webhooks, the actions recorded on the card are showing that the description changed, but then the next time it changed the “old” desc wasn’t the thing that it was changed to previously. The description had changed back without a corresponding action being shown in the history of the card.

Hey Bentley,

I have another example of this happening. On this card:

https://trello.com/c/aNEH6Exn/6027-order-leedstone-inc

If you load the actions to update the description:

https://trello.com/1/cards/aNEH6Exn/actions?filter=updateCard:desc

Then you can see that there is an update to set the “Carrier” to “UPS”, and in the action that occurs immediately after that, the “old” desc doesn’t have that information. I’ve extracted just those 2 adjacent actions and REDACTED any sensitive information here, just search for “Carrier: UPS”:

  {
    "id": "5ff877d5a1f66a2946d6eccd",
    "idMemberCreator": "5ae7b3a1b64b0e2c3e604cc7",
    "data": {
      "old": {
        "desc": "____\nData Fields\n____\nOrder ID: aNEH6Exn\nCompany Name: Leedstone Inc\nCompany Contact Name: REDACTED\nCompany Contact Email: REDACTED\nCompany Contact Phone: REDACTED\nContact Name: REDACTED\nContact Email: REDACTED\nPrice Type: USD\nWarehouse number: 345110\nOrder/Invoice number:\nClient's PO Number: C21007C\nItems: \n8 x Green Spray - 12 bottles/case (G12)\nShipping address:\nREDACTED\nWeight: 57 Lbs\nDimensions: 48 x 40 x 15\n% discount on shipping:\nCost shipping: $ 53.19\nQuote number:\nCarrier:\nTracking info: \n____\n\nIf applicable:\nProfessional Discount:\nNote:\n\n\nTESTING New shipping details:\nNumber of pallets used: 1\nTotal weight of this shipment: 25 kg\nDimensions and weight in each pallet:\n121 X 101 X 17 cm / 25.6 kg{\"obj\":[{\"pallet_data\":{\"w\":101,\"h\":17,\"d\":121,\"id\":\"Pallet1\",\"used_space\":33.1233,\"weight\":25.6,\"used_weight\":1.9062,\"order_id\":null},\"items\":[{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2}]}]}"
      },
      "card": {
        "desc": "____\nData Fields\n____\nOrder ID: aNEH6Exn\nCompany Name: REDACTED\nCompany Contact Name: REDACTED\nCompany Contact Email: REDACTED\nCompany Contact Phone: REDACTED\nContact Name: REDACTED\nContact Email: REDACTED\nPrice Type: USD\nWarehouse number: 345110\nOrder/Invoice number: 1005877\nClient's PO Number: C21007C\nItems: \n8 x Green Spray - 12 bottles/case (G12)\nShipping address:\nREDACTED\nWeight: 57 Lbs\nDimensions: 48 x 40 x 15\n% discount on shipping:\nCost shipping: $ 53.19\nQuote number:\nCarrier:\nTracking info: \n____\n\nIf applicable:\nProfessional Discount:\nNote:\n\n\nTESTING New shipping details:\nNumber of pallets used: 1\nTotal weight of this shipment: 25 kg\nDimensions and weight in each pallet:\n121 X 101 X 17 cm / 25.6 kg{\"obj\":[{\"pallet_data\":{\"w\":101,\"h\":17,\"d\":121,\"id\":\"Pallet1\",\"used_space\":33.1233,\"weight\":25.6,\"used_weight\":1.9062,\"order_id\":null},\"items\":[{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2}]}]}",
        "id": "5ff78a1da264961c16337c4f",
        "name": "ORDER: REDACTED",
        "idShort": 6027,
        "shortLink": "aNEH6Exn"
      },
      "board": {
        "id": "59e7d6836ad580069fa7f3f2",
        "name": "Order Processing",
        "shortLink": "aevORRoW"
      },
      "list": {
        "id": "5ba35264534c1c48786e5cff",
        "name": "QuickBooks"
      }
    },
    "type": "updateCard",
    "date": "2021-01-08T15:18:45.765Z",
    "limits": {
      
    },
    "appCreator": {
      "id": "5ae7b4504e68cdf39fbcb090"
    },
    "memberCreator": {
      "id": "5ae7b3a1b64b0e2c3e604cc7",
      "username": "REDACTED",
      "activityBlocked": false,
      "avatarHash": null,
      "avatarUrl": null,
      "fullName": "REDACTED",
      "idMemberReferrer": null,
      "initials": "TC",
      "nonPublic": {
        "fullName": "REDACTED",
        "initials": "TC",
        "avatarHash": null
      },
      "nonPublicAvailable": true
    }
  },
  {
    "id": "5ff8776f036181043183155d",
    "idMemberCreator": "5ae7b3a1b64b0e2c3e604cc7",
    "data": {
      "old": {
        "desc": "____\nData Fields\n____\nOrder ID: aNEH6Exn\nCompany Name: REDACTED\nCompany Contact Name: REDACTED\nCompany Contact Email: REDACTED\nCompany Contact Phone: REDACTED\nContact Name: REDACTED\nContact Email: REDACTED\nPrice Type: USD\nWarehouse number: 345110\nOrder/Invoice number:\nClient's PO Number: C21007C\nItems: \n8 x Green Spray - 12 bottles/case (G12)\nShipping address:\nREDACTED\nWeight: 57 Lbs\nDimensions: 48 x 40 x 15\n% discount on shipping:\nCost shipping: $ 53.19\nQuote number:\nCarrier:\nTracking info: \n____\n\nIf applicable:\nProfessional Discount:\nNote:\n\n\nTESTING New shipping details:\nNumber of pallets used: 1\nTotal weight of this shipment: 25 kg\nDimensions and weight in each pallet:\n121 X 101 X 17 cm / 25.6 kg{\"obj\":[{\"pallet_data\":{\"w\":101,\"h\":17,\"d\":121,\"id\":\"Pallet1\",\"used_space\":33.1233,\"weight\":25.6,\"used_weight\":1.9062,\"order_id\":null},\"items\":[{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2}]}]}"
      },
      "card": {
        "desc": "____\nData Fields\n____\nOrder ID: aNEH6Exn\nCompany Name: REDACTED\nCompany Contact Name: REDACTED\nCompany Contact Email: REDACTED\nCompany Contact Phone: REDACTED\nContact Name: REDACTED\nContact Email: REDACTED\nPrice Type: USD\nWarehouse number: 345110\nOrder/Invoice number:\nClient's PO Number: C21007C\nItems: \n8 x Green Spray - 12 bottles/case (G12)\nShipping address:\nREDACTED\nWeight: 57 Lbs\nDimensions: 48 x 40 x 15\n% discount on shipping:\nCost shipping: $ 53.19\nQuote number:\nCarrier: UPS\nTracking info: \n____\n\nIf applicable:\nProfessional Discount:\nNote:\n\n\nTESTING New shipping details:\nNumber of pallets used: 1\nTotal weight of this shipment: 25 kg\nDimensions and weight in each pallet:\n121 X 101 X 17 cm / 25.6 kg{\"obj\":[{\"pallet_data\":{\"w\":101,\"h\":17,\"d\":121,\"id\":\"Pallet1\",\"used_space\":33.1233,\"weight\":25.6,\"used_weight\":1.9062,\"order_id\":null},\"items\":[{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2},{\"id\":\"green spray - 12 bottles/case\",\"w\":17,\"h\":22,\"d\":23,\"wg\":3.2}]}]}",
        "id": "5ff78a1da264961c16337c4f",
        "name": "ORDER: REDACTED",
        "idShort": 6027,
        "shortLink": "aNEH6Exn"
      },
      "board": {
        "id": "59e7d6836ad580069fa7f3f2",
        "name": "Order Processing",
        "shortLink": "aevORRoW"
      },
      "list": {
        "id": "5ba352b845ebbe2a03c54e9a",
        "name": "Send Shipping Instructions"
      }
    },
    "type": "updateCard",
    "date": "2021-01-08T15:17:03.259Z",
    "limits": {
      
    },
    "appCreator": {
      "id": "5ae7b4504e68cdf39fbcb090"
    },
    "memberCreator": {
      "id": "5ae7b3a1b64b0e2c3e604cc7",
      "username": "REDACTED",
      "activityBlocked": false,
      "avatarHash": null,
      "avatarUrl": null,
      "fullName": "REDACTED",
      "idMemberReferrer": null,
      "initials": "TC",
      "nonPublic": {
        "fullName": "REDACTED",
        "initials": "TC",
        "avatarHash": null
      },
      "nonPublicAvailable": true
    }
  }

So it seems somehow that a description update is being overwritten without an action being recorded against it.

Hey @bcook any idea how the description could be changing these cases?

Hmm. This seems fishy. Maybe a race condition is occurring? Are all of these changes occurring via the Trello web client?

I’m going to go ahead and open a case for the backend API team to dig into this. I’ll add you to the ticket, @IainDooley as there will likely be follow-up questions.

To time: 2021-01-08T15:18:45.000Z

To time: 2021-01-08T15:17:03.000Z

Those actions are taking place quite close together.

Hey @bcook sorry for the delay, these changes are all occuring via the API. Both the actions are by the same user, who is a “bot” that acts only via the API. So if it were the case that there was some conflict between a user via web clobbering changes made via the API, we should surely see separate actions for each change. In that case I could imagine that the “old” would be the same in both cases, because the “old” that was loaded in the web was the same as that loaded during the API change, but in this case it’s a single user and in both cases the changes are being made via the API.

Even if it were a problem of concurrency, ie. 2 notifications being processed simultaneously, out of order, the “old” desc isn’t being like, posted via the API right? It’s defined as being the state in which the card was prior to the update being sent.

So I’m not sure how there could be a valid situation where the “old” would be the same in 2 consecutive actions with no intervening actions.