Skip to content

Commit

Permalink
Merge pull request #185 from diegojromerolopez/master
Browse files Browse the repository at this point in the history
New feature: move all list from a card to another list
  • Loading branch information
sarumont authored Feb 18, 2017
2 parents 68d03df + 562e8c3 commit fb4b612
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions trello/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def get_members(self, filters=None):
m.username = obj['username']
m.full_name = obj['fullName']
m.initials = obj.get('initials', '')
m.member_type = obj.get('memberType', '')
members.append(m)

return members
Expand Down
7 changes: 7 additions & 0 deletions trello/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,13 @@ def set_due(self, due):
self._set_remote_attribute('due', datestr)
self.due = datestr

def remove_due(self):
"""
Remove the due datetime of this card.
"""
self._set_remote_attribute('due', None)
self.due = ''

def set_pos(self, pos):
"""
Update card position in list
Expand Down
14 changes: 14 additions & 0 deletions trello/trellolist.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@ def archive_all_cards(self):
'/lists/' + self.id + '/archiveAllCards',
http_method='POST')

def move_all_cards(self, destination_list):
"""
Move all cards of this list to another list.
The list can be in the same board (or not).
"""

self.client.fetch_json(
'/lists/' + self.id + '/moveAllCards',
http_method='POST',
post_args = {
"idBoard": destination_list.board.id,
"idList": destination_list.id,
})

def fetch_actions(self, action_filter):
"""
Fetch actions for this list can give more argv to action_filter,
Expand Down

0 comments on commit fb4b612

Please sign in to comment.