Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Getting old comments fom copied cards

Marcus Bogren December 19, 2017

Hello,

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.

 

1 answer

1 accepted

1 vote
Answer accepted
Caity
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 20, 2017

Hi Marcus,

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.

Marcus Bogren December 20, 2017

Hi Caity,

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?

Edit:

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.

Caity
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 20, 2017

Hi Marcus,

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.

Marcus Bogren December 21, 2017

Hi Caity,

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.

Caity
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2017

Hi Marcus,

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 since and 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:

https://developers.trello.com/v1.0/docs/api-introduction#section-paging

Marcus Bogren December 21, 2017

I'll try the API then, thanks for your help Caity!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events