Custom Fields now required to be specified in keepFromSource when copying a card

When copying a card, you make a POST request to /cards with an idCardSource in the post body. There is also a keepFromSource field, which specifies which special fields should be copied over. Those fields currently are:

['attachments', 'checklists', 'due', 'labels', 'members', 'stickers']

Everything else on the card is copied, including Custom Fields.

Now that Custom Fields is a core feature for paid workspaces, we are adding the option to NOT copy Custom Fields data when copying a card. This means that after this change, in order to copy Custom Fields data when copying a card, you must include "customFields" in keepFromSource.

For example, a POST body copying a card and including Custom Fields:

{
  idBoard: "527f5a5219879e23c6cb2908"
  idCardSource: "610a9f350ed39a812ffe2dae"
  idList: "604f9ff30f6876e7605b0c50"
  keepFromSource: ["start", "due", "comments", "customFields"]
  name: "Card with Custom Fields"
  pos: "360447"
}

You can future proof your code by adding "customFields" to keepFromSource right now before the change is actually live. The planned release date for this change is Monday, September 13, 2021.

3 Likes

Hi there, what is the expected behaviour for when ā€˜keepFromSourceā€™=ā€˜allā€™?

I believe we are seeing that custom fields are not copied in this case. Is that a bug or do we have to specify both eg. ā€˜all,customFieldsā€™

Thanks
Richard

Hey Richard, ā€œkeepFromSource=allā€ should work as expected, ie it would copy Custom Fields along with everything else.

If itā€™s not doing that, we definitely have a bug on our hands. Thanks for reporting this, weā€™ll look into it.

Does specifying both ā€œall,customFieldsā€ get around the bug for now though?

Richard, Iā€™m not able to reproduce the bug. When using keepFromSource="all" in a copy card request, Iā€™m seeing that my cards are copied with the right Custom Fields. If youā€™re having any trouble, feel free to reach out to Trello, or create your own thread in the developer forums.

Is there any plan to add the ability to keep / not keep the source cardā€™s cover when doing a copy? By default, itā€™s always copied and then has to be removed afterwards.