Add last_activity_on to BillableMember entity
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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Vijay Hawoldar