question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

help with copying card from one board to another

See original GitHub issue

I am not a Python expert and trying to learn and trying to use py-trello. Thank you for writing the library!

Would like to copy a card from one board to a list in a different board. Have selected the source_board, target_board and target_list using the functions available in py-trello. Unable to copy the card though.

Now py-trello already has code for moving a card.

    def change_board(self, board_id, list_id=None):
        args = {'value': board_id}
        if list_id is not None:
            args['idList'] = list_id
        self.client.fetch_json(
            '/cards/' + self.id + '/idBoard',
            http_method='PUT',
            post_args=args)

I can tell that the answer lies on this Trello API page in terms of how the url is to be formed that needs to go to the Trello API, but honestly am not clear as to what the parameters should be if say I want to copy everything that can be copied in a card - attachments, checklists, labels, comments and description.

Also, even if the url format were to be clear to me, I am not sure how to create a function to copy the card by modifying the change_board function above. Not sure of how to augment the class in my code 😦

Thank you for your help.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sahandevscommented, Jun 19, 2019

hi @mals14, it’s better to ask this kind of questions in stackoverflow. but you can use this method i wrote for copying cards https://github.com/SahandAkbarzadeh/trello-chicbot/blob/master/lib_trello/trello_extensions.py

0reactions
mals14commented, Sep 9, 2019

hi @mals14, it’s better to ask this kind of questions in stackoverflow. but you can use this method i wrote for copying cards https://github.com/SahandAkbarzadeh/trello-chicbot/blob/master/lib_trello/trello_extensions.py

And thank you for sharing your method. It worked beautifully, and it has given me pointers as to how to use code from within a Python library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Copying a card to another board - Trello - Atlassian Community
No, copied cards are completely independent of one another. You can however sync cards across boards using Unito if you need that functionality....
Read more >
Copying Trello cards from one board to another
Click the card. Click Copy. Select the right board from the (long!) list of boards. Select the list in destination board.
Read more >
How to copy cards across boards with Amazing Fields
How to copy cards across boards with Amazing Fields · Open the board utilities as shown in the image below · Look for...
Read more >
Copy new or moved Trello cards from one board or list to ...
If your workflow has you constantly copying and pasting cards from one board to another, use this Trello integration to skip a step....
Read more >
How to copy or move cards between boards
You can create a copy by opening the panel when you click a card title. Alternatively, you can double-click a card and copy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found