Members given access date/time is wrong (request date is shown)
Summary
I requested access to a Group on Friday and got the acces on Monday. In 'Group->Members' it's shown as "Given access 2 days ago" instead of "Given access 5 minutes ago".
The request timestamp is used instead of the granted timestamp.
Steps to reproduce
Request access for a group and wait some time before granting.
Using GitLab Enterprise Edition 11.3.4-ee gitlab-ce@14d3a1dcd514c77fbbd9646d39e3729eecf03b1c
Implementation guide
-
Add a new column to the memberstable calledrequest_accepted_at -
Set request_accepted_atcolumn in app/models/member.rb#L453 when the access request is accepted. -
In the next MR in the next milestone: Backfill that column to created_atwhenrequested_at: nil && invite_token: nil && NOT invite_accepted_at: nil. -
Expose request_accepted_atin app/serializers/member_entity.rb#L12 -
In app/assets/javascripts/members/components/table/member_activity.vue#L31 use member.requestAcceptedAtif it is notnull, otherwise usemember.createdAt. -
1 milestone after the backfill, the fallback for member.createdAtcan be removed, see Remove `this.member.createdAt` fallback once `r... (#468306 - closed)
Edited by Anton Kalmykov