Is it possible to get the old comments from copied/moved cards?
I'd like to export a list to JSON that's an upgraded version of an old list; problem is that all the cards in that old list are copied, so the comments does not get included in the JSON export. Only comments made -after- the card was copied appears in the JSON export.
When copying a card individually, there's an option to include the card's comments on the copy. However, if this isn't selected at that time, those older comments won't be associated with the new card.
As a workaround, you could get those comments via the API by looking for the action where the card was copied to find the ID of the card it was copied from, and then look up the comments for that card.
Thank you for the response.
It turned out that the cards had actually been moved, not copied. For some reason the comments from the moved cards are present when you view them in Trello; but they are not present in the JSON export. Only the comments made after the cards were moved are present in the JSON.
However, I tried making a new list for testing and moved some cards there and then the comments for those cards did show up in the JSON export.
I newly joined the Trello board so I'm not aware of how they actually moved the old cards, but looking at the card history there is logging such as: "(Person) moved this card from Backlog version 1.0 to Backlog version 1.1".
I haven't checked if I can get those old comments using the API yet, but shouldn't they show up in the JSON export?
If I go into an individual old card and export the JSON then I get all the comments for that card. But if I export the whole board as JSON the comments for the old cards are not present in the JSON data.
Thanks in advance.
Are you exporting the board as a whole or just that card? If it's the board as a whole, it could be that these comments aren't recent enough. The JSON export will show the most recent 1000 actions, so if the card was copied prior to that, those comments wouldn't show up in the export.
If you haven't tried exporting just the card yet, could you give that a try and let us know if the old comments appear there?
Also, when searching for these comments in the export, you'll want to be sure to look for the copyCommentCard, rather than the commentCard action.
Yes I'm exporting the whole board as JSON.
If I do export the cards individually then the comments show up in the JSON.
I guess that those comments are not one of the 1000 recent actions then as you said and that's why they don't show up on the board export, and only on the card exports.
Is there any way to work around this? I need the whole board JSON for a tool that parses the JSON and outputs a readable document. A JSON file for each individual card will be too many files to work with.
While the JSON can only fetch the 1000 most recent actions, you can use the API to retrieve older actions in multiple requests, using the
before parameters to determine where the actions should begin and end.
We have some more information about how to do that in our API guide here:
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
A blank Trello board can be both a beautiful and intimidating thing. How many lists should I have? Is creating 10 labels overkill? How can I best track my progress? Is there a way...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs