Date last activity on card not updating when removing member

I am using Trello rest API’s for fetching board along with all card details

Board API endpoint: /1/boards/{board_id}
query parameters:

query: {
      fields: 'id,name,dateLastActivity',
      lists: 'open',
      list_fields: 'id,name',
      cards: 'open',
      card_fields: 'id,name,idList,idMembers,idLabels,due,desc,start,dateLastActivity',
      members: 'all',
      member_fields: 'id,fullName,username'
    },

Issue: When I am removing card member using Trello website, the dateLastActivity field is not updating but when adding a new card member, the dateLastActivity field is updating to new timestamp.

Is this behavior expected?

Note: fetch board response via rest api and add/remove card member via website

Hello @ManinderSingh

The answer is… it depends if any actions were performed on the card between when the member joined the card and then left the card.

If a member joins a card, that activity is recorded in the card’s activity history, so gets recorded in the dateLastActivity field. If no subsequent action takes place on the card before the member leaves the card, that leaving action ‘undoes’ the prior joining action, and the activity of joining the card is silently removed from the card’s activity history, so there is no timestamp of that removal in the dateLastActivity field.

You can discover this for yourself via the GUI by adding a member to a card, looking at the activity details, then immediately removing the member and looking at the activity details again. There will be no record in the activity history of the member either joining or leaving.

However, if a member joins a card, then an intermediate action takes place on the card, before the member leaves the card, then the leaving action is recorded in the card’s activity history, so there is a timestamp of the leaving activity in the dateLastActivity field.

If adding a member into card is an activity that updates timestamp (dateLastActivity) then removing it from card should also do the same. Didn’t understand why is not doing it.

@sunnyape Can you please share some information why it’s implemented this way?

Sorry, I don’t work for Atlassian, so I can’t advise as to their decisions on the functionality of their products. Someone from the Trello product team might be able to advise.

PS. If my original answer was correct, could you please mark it as such, so as to inform the next person who has the same question.