t.card("id") in card-badges handler returns the open card's ID for all cards on the board when a card is open

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      When a card is open on the Trello board, t.card("id") called inside the card-badges capability handler returns the ID of the currently open card for all cards on the board, instead of the ID of the specific card the handler is being called for. This causes all card badges to display data from the open card, resulting in incorrect and misleading information shown to the user.

      Steps to Reproduce

      1. Install a Power-Up with a card-badges handler that calls t.card("id") and displays a badge with the result
      2. Load the board. All cards correctly display their own IDs (expected behavior)
      3. Within 5 seconds, open any card and keep it open on the board
      4. After 5 seconds, trigger a re-render of card badges (e.g., via t.set("member", "private", {...}))
      5. All cards now display the open card's ID instead of their own

      Expected Results

      t.card("id") should return the ID of the specific card the card-badges handler is being called for, regardless of which card is currently open on the board.

      Actual Results

      t.card("id") returns the ID of the currently open card for all cards on the board.

      Workaround

      Use t.getContext() to extract the card ID from within the handler's own context instead of t.card("id").

              Assignee:
              Unassigned
              Reporter:
              Alisson Dalmago
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: