mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd): add owner-related fields to tasks_with_status view (#20471)
Relates to https://github.com/coder/coder/pull/20431/files#diff-9cfc826a6ce7e77d977b2025482474dd263d12965b2a94479a74c7f1d872b782 If the workspace relating to a task was deleted, most of the workspace-related fields in `taskFromDBTaskAndWorkspace` will be zero-valued. However, we can still get information relating to the owner so that "created by" shows up correctly in the UI. Updates the `tasks_with_status` view with a join on `visible_users` to get owner-related info.
This commit is contained in:
@@ -4221,6 +4221,9 @@ type Task struct {
|
||||
WorkspaceBuildNumber sql.NullInt32 `db:"workspace_build_number" json:"workspace_build_number"`
|
||||
WorkspaceAgentID uuid.NullUUID `db:"workspace_agent_id" json:"workspace_agent_id"`
|
||||
WorkspaceAppID uuid.NullUUID `db:"workspace_app_id" json:"workspace_app_id"`
|
||||
OwnerUsername string `db:"owner_username" json:"owner_username"`
|
||||
OwnerName string `db:"owner_name" json:"owner_name"`
|
||||
OwnerAvatarUrl string `db:"owner_avatar_url" json:"owner_avatar_url"`
|
||||
}
|
||||
|
||||
type TaskTable struct {
|
||||
|
||||
Reference in New Issue
Block a user