Reputation: 63
I'm using the Trello API to copy cards from one board to another successfully, but am having trouble figuring out the "KeepFromSource" parameters. The default is "all", but the documentation does not supply other values. I specifically want to copy everything over from my card including attachments, but want to exclude comments on the card. Does anyone know how to do this? Here is the piece of the code that I would like to include the keepfromsource:
var payload = {"due": "",
"idList":copyList,
"idCardSource":cardID,
"keepFromSource":???????
};
var url = 'https://api.trello.com/1/cards?key='+key+'&token='+token;
var options = {"method" : "post",
"payload" : payload};
UrlFetchApp.fetch(url, options);
Thank you!
Upvotes: 4
Views: 2364
Reputation: 2308
Valid values are "attachments"
, "checklists"
, "comments"
, "all"
, "none"
.
You can mix the first three by separating them with a comma.
For example, "attachments,checklists"
will copy over all the attachments and checklists.
We figured this out through testing.
Upvotes: 4
Reputation: 63
Found my own answer. I was able to keep the attachments and no comments by using "keepFromSource" = "attachments".
Upvotes: 1