Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teams #18

Open
OliPlus opened this issue Mar 12, 2018 · 2 comments · May be fixed by #26
Open

Teams #18

OliPlus opened this issue Mar 12, 2018 · 2 comments · May be fixed by #26
Labels

Comments

@OliPlus
Copy link

OliPlus commented Mar 12, 2018

OK, I found that teams are supported with the '--organizations' switch.
There is one small bug in the organizations.

The folder 'me' contains always all 'Boards'. Hence if a board 'Board 1' belongs to the organization/team 'Team 1' this board shows up in the backup two times.

2015-11-12_23-28-36_backup/
└── me
...└── Board 1
└── team 1
...└── Board 1

This increases the amount of downloaded data big time.

@OliPlus
Copy link
Author

OliPlus commented Mar 12, 2018

` org_boards_data = {}
my_boards_url = '{}members/me/boards{}'.format(API, auth)

orgs = []
if args.orgs:
    org_boards_data['Personal Boards'] = requests.get(my_boards_url).json()
    org_url = '{}members/me/organizations{}'.format(API, auth)
    orgs = requests.get(org_url).json()
else:
    org_boards_data['All Boards'] = requests.get(my_boards_url).json()

for org in orgs:
    boards_url = '{}organizations/{}/boards{}'.format(API, org['id'], auth)
    boards_data = requests.get(boards_url).json()
    for board in boards_data:
        org_boards_data['Personal Boards'].remove(board)
    org_boards_data[org['displayName'] + ' (' + org['name'] + ')'] = boards_data

for org, boards in org_boards_data.items():
    print('Processing', org)
    mkdir(org)
    os.chdir(org)
    boards = filter_boards(boards, args.closed_boards)
    for board in boards:
        backup_board(board, args)
    os.chdir('..')

print('Trello Full Backup Completed!')`

This is my solution at the end of the backup script which solves the problem.

I added
print('Backup organizations:', bool(args.orgs))
behind
print('Backup archived lists:', bool(args.archived_lists))
, too.

@jtpio
Copy link
Owner

jtpio commented Mar 12, 2018

Thanks for the report!

There is a work in progress in PR #17 to drop support for the folder tree structure and clean things up a bit. We can get your fix in once this is done.

@jtpio jtpio added the bug label Mar 12, 2018
OliPlus added a commit to OliPlus/trello-full-backup that referenced this issue Feb 18, 2019
If -m and -o is used all organization boards show up under their organization as well as under my boards.
OliPlus added a commit to OliPlus/trello-full-backup that referenced this issue Feb 18, 2019
…ment; jtpio#18

- extended filename size
- ' instead "
- improved use of 'sanitize_file_name'
- tokenize organizations
- write full organization JSON
- -M argument to mark names folders and files closed
- bug fix jtpio#18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants