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 members
table calledrequest_accepted_at
-
Set request_accepted_at
column 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_at
whenrequested_at: nil && invite_token: nil && NOT invite_accepted_at: nil
. -
Expose request_accepted_at
in app/serializers/member_entity.rb#L12 -
In app/assets/javascripts/members/components/table/member_activity.vue#L31 use member.requestAcceptedAt
if it is notnull
, otherwise usemember.createdAt
. -
1 milestone after the backfill, the fallback for member.createdAt
can be removed, see Remove `this.member.createdAt` fallback once `r... (#468306)
Edited by Anton Kalmykov