ENT-11235: Updating schema to add invited_date and joined_date fields to customer admin#2524
Conversation
2fee8a7 to
800a730
Compare
a5b8d6d to
c6ab3df
Compare
| enterprise_customer_user=enterprise_customer_user, | ||
| defaults={ | ||
| 'invited_date': pending_admin_user.created, | ||
| 'joined_date': timezone.now(), |
There was a problem hiding this comment.
joined_date is redundant with created. Remove the joined_date field.
|
OK, first thing, this PR isn't ready for review. Please see the Pull Request Standards listed here. This PR will not be reviewed until these measures are met. ❌ CI/tests passing (or clearly call out what’s failing and why) Second the feedback Troy has provided above has been provided at least 3 times in the past, yet this PR was posted with this exact issue again.
The net net on this is that the EnterpriseAdmin record doesn't get created until the admin accepts the invite. Before that point they only have a PendingEnterpriseAdmin record. The act of accepting the invite creates the record. Therefore we do not need a joined date as the join date is the same as the created date. Since The EnterpriseAdmin class extends the TimestampModel Class the created dates are in the model by default. This is why we don't just open new PRs... We continue iterating in the same PR. Opening this as a new PR again we loose the resolution of the past conversation and how things we've already fixed are back. Super sloppy work, unacceptable. My advice? Do not re-open this PR. Go back to the first PR and the first branch and fix it. |
This is the ticket :
ENT-11235
Description:
We need to support new metadata for admins, including tracking when an admin was invited and when they joined. Review the existing admin table and ensure new fields do not break existing APIs.