trello-full-backup icon indicating copy to clipboard operation
trello-full-backup copied to clipboard

Missing card backups

Open mjf-ans opened this issue 2 years ago • 0 comments

There are many cards which are present in the board's $NAME_full.json backup, but don't get their own card.json file, and their attachments aren't downloaded.

The problem is here:

    cs = itertools.groupby(board_details['cards'], key=lambda x: x['idList'])
    for list_id, cards in cs:
        lists[list_id] = sorted(list(cards), key=lambda card: card['pos'])

This assumes that all the cards for any list are together in one batch in the board's data. If they are split up (which I've seen happen), the last batch in the itertools.groupby overwrites any previous ones in list, and only those cards are backed up.

This pull request fixes that.

mjf-ans avatar Aug 10 '22 14:08 mjf-ans