Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(coderd): add owner-related fields to tasks_with_status view#20471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 3 commits intomainfromcj/tasks-with-status-owner-fields
Oct 28, 2025

Conversation

@johnstcn
Copy link
Member

Relates tohttps://github.com/coder/coder/pull/20431/files#diff-9cfc826a6ce7e77d977b2025482474dd263d12965b2a94479a74c7f1d872b782

If the workspace relating to a task was deleted, most of the workspace-related fields intaskFromDBTaskAndWorkspace 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 thetasks_with_status view with a join onvisible_users to get owner-related info.

@johnstcnjohnstcnforce-pushed thecj/tasks-with-status-owner-fields branch fromc7880c2 to9506ec0CompareOctober 28, 2025 12:09
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGMT, just one suggestion for the join.

task_owner.owner_name,
task_owner.owner_avatar_url
FROM (((((tasks
LEFT JOIN LATERAL (SELECTvu.usernameAS owner_username,
Copy link
Member

@mafredrimafredriOct 28, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(Inner)JOIN LATERAL should be fine here. As long as there can only be one unique owner and the owner id must always be set to an existing user (fk constraint).

That removes nullability from the user columns, although I see sqlc isn't picking that up.

Edit: Actually a regular join might also be fine (non lateral) 🤔

johnstcn reacted with thumbs up emoji
@johnstcnjohnstcnforce-pushed thecj/tasks-with-status-owner-fields branch from6f5243b tof663689CompareOctober 28, 2025 14:18
@johnstcnjohnstcn merged commit659f89e intomainOct 28, 2025
30 checks passed
@johnstcnjohnstcn deleted the cj/tasks-with-status-owner-fields branchOctober 28, 2025 14:29
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 28, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@mafredrimafredrimafredri approved these changes

@DanielleMaywoodDanielleMaywoodDanielleMaywood approved these changes

Assignees

@johnstcnjohnstcn

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@johnstcn@mafredri@DanielleMaywood

[8]ページ先頭

©2009-2025 Movatter.jp