wiki:UseCase0002PrototypeImplementation

Use-case UC0002 Implementation – Client views project and task status

Initiating actor: Client

Other actors:

Description: The Client logs in to review the progress of the work being done for them. The system shows the Client only their own projects and the tasks within them, together with each task's status, due date, and completion progress.

Scenario

  1. Client (Goran Trajkovski) logs in and opens the "Projects" tab on their dashboard. The system lists only the projects and tasks belonging to this client:
    SELECT id, name, status, service_type, created_at::date AS created
    FROM project.projects
    WHERE client_id = 4
    ORDER BY created_at DESC;
    
  2. For each task, the system loads its status, due date, and the assigned workers using a join across the task_workers associative table:
    SELECT t.id, t.title, t.status,
           t.due_date::date AS due_date,
           COALESCE(string_agg(u.name, ', ' ORDER BY u.name), '(unassigned)') AS assigned_workers
    FROM project.tasks t
    LEFT JOIN project.task_workers tw ON tw.task_id = t.id
    LEFT JOIN project.users u          ON u.id = tw.user_id
    WHERE t.client_id = 4
    GROUP BY t.id, t.title, t.status, t.due_date
    ORDER BY t.id;
    
  3. System displays the task list. The Client can see, for example, that "Design homepage mockup" is Done (100% complete) and "Develop landing page" is In Progress (50% complete), each with its creation date and due status.

The WHERE client_id = 4 filter ensures the Client only ever sees their own data. The LEFT JOINs guarantee that tasks with no assigned worker still appear (shown as "(unassigned)"), and string_agg collapses the many-to-many worker assignments into a single readable column.

Last modified 4 days ago Last modified on 07/01/26 17:14:39

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.