Skip to content

Add last_activity_on to BillableMember entity

Vijay Hawoldar requested to merge vij-add-last-activity into master

What does this MR do?

As discussed in #297291 (closed) and #33457 (closed), the Billable Members page is eventually going to display the date each member was last active.

In order to support this, the members API needs to return that attribute.

This MR addresses that by adding it to the BillableMembers Grape Entity.

Testing

You can test this modification with the following:

curl --request GET \                                                 
     --header 'Content-Type: application/json' \ 
     --header "PRIVATE-TOKEN: <your token>" \
     "http://127.0.0.1:3000/api/v4/groups/<group name>/billable_members"

Example response:

[
  {
    "id": 1,
    "name": "Administrator",
    "username": "root",
    "state": "active",
    "avatar_url": "https://www.gravatar.com/avatar/123",
    "web_url": "http://127.0.0.1:3000/root",
    "email": "",
    "last_activity_on": "2021-01-26"
  }
]

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Vijay Hawoldar

Merge request reports