Skip to content

Show task owner (username) in tasks table#2214

Open
levensonblaine wants to merge 1 commit into
hashtopolis:masterfrom
levensonblaine:task-owner-column
Open

Show task owner (username) in tasks table#2214
levensonblaine wants to merge 1 commit into
hashtopolis:masterfrom
levensonblaine:task-owner-column

Conversation

@levensonblaine

Copy link
Copy Markdown

Adds an "Owner" column to the tasks list showing the username of the user who created each task/supertask.

The schema previously had no task–user relation, so this introduces one:

TaskWrapper gets a nullable userId column (install schema src/install/hashtopolis.sql, DBA model/factory, generator.php) with FK to User.
The creator's userId is set at all 6 new TaskWrapper(...) creation sites (web task creation, TaskUtils::createTask, pretask/supertask runs, applyPreconfTasks, rule-split inherits the original wrapper's userId). PretaskUtils::runPretask and SupertaskUtils::runSupertask gained an optional $user param, passed from web handlers, user-api, and apiv2 callers.
UserUtils::deleteUser nulls TaskWrapper.userId (same pattern as Agent.userId).
Util::loadTasks resolves usernames (single user query, map lookup) into taskOwner; templates tasks/index|normal|supertask render the new column (DataTable column indices shifted accordingly). Tasks without an owner (e.g. pre-existing or server-generated) show an empty cell.

Co-Authored-By: Vladislav Kobilinskiy <kobilinskiyvladislav@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant