-
Notifications
You must be signed in to change notification settings - Fork 1
Description
A quick test would suggest that the call:
trello.cards.get_action(card_id)
only returns the top 50 actions, which means that pulling out the original comment will fail once you have more that 50 actions.
There are various fixes to this:
- change the call to
trello.cards.get_action(card_id,limit=<limit>)where limit is between 0 and 1000 (according to https://trello.com/docs/api/card/index.html#get-1-cards-card-id-or-shortlink-actions); 0 appears to mean return no actions - change the call to
trello.cards.get_action(card_id,filter='commendCard')to only return the comment cards - a combination of these 2 options
This would resolve the issue for new, and be backwards compatible.
However, an alternative approach would be to use the card description to contain this information, rather than a commend on the card. This change could be made in a backwards compatible way (checking both description and the comment cards, and optionally moving the data from the comment card into the description) so that get_app_version would go something like:
def get_app_version(card):
desc = card['desc']
# check for *** System Info ** and determine version
# Not found in desc
cards = trello.cards.get_action(card['id'],filter='commentCard'. limit=1000)
cards.reverse()
for action in cards:
# extract app version
# optionally put data into description field
Can you let me know what are your thoughts on this ? I'm then happy to provide a patch ;-)