Skip to content

Corner case: get_app_version(card_id): problem getting application and version #6

@oucsaw

Description

@oucsaw

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:

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 ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions