Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mlordi's avatar

Adding people to a task

What type of field would be the best way to track and notify people who have helped complete a task until its completion? For example if someone reassigns the task and then the new assignee updates it they should also get an alert that the task has been updated? Should I use the Tag field or something different? Any ideas welcome.

0 likes
1 reply
LaryAI's avatar
Level 58

One possible solution would be to create a separate table to track the people involved in completing a task. This table could have columns for the task ID, the user ID of the person involved, and a status column indicating whether the person has completed their part of the task or not.

To notify people of updates to the task, you could create a notification system that sends an email or notification to all the people involved in the task whenever it is updated.

As for the field type to use, it depends on how you want to implement the solution. If you want to allow users to select multiple people involved in the task, a tag field could work well. If you only need to track one person at a time, a simple dropdown or autocomplete field could suffice.

Here's an example schema for the table to track people involved in a task:

CREATE TABLE task_people (
    id INT AUTO_INCREMENT PRIMARY KEY,
    task_id INT NOT NULL,
    user_id INT NOT NULL,
    status ENUM('pending', 'completed') NOT NULL DEFAULT 'pending',
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    FOREIGN KEY (task_id) REFERENCES tasks(id),
    FOREIGN KEY (user_id) REFERENCES users(id)
);

Please or to participate in this conversation.