Changes between Initial Version and Version 1 of UseCase0002


Ignore:
Timestamp:
07/01/26 16:41:10 (5 days ago)
Author:
221544
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase0002

    v1 v1  
     1= Use-case UC0002 – Client views project and task status =
     2
     3'''Initiating actor:''' Client
     4
     5'''Other actors:''' –
     6
     7'''Description:''' The Client logs in to check the progress of the work being done for them. The system shows the Client's own projects and, for a selected project, the tasks within it together with their status and the workers assigned.
     8
     9== Scenario ==
     10
     11 1. '''Client''' opens their dashboard. The '''system''' lists the projects that belong to this client:
     12{{{
     13#!sql
     14SELECT id, name, status, service_type, created_at::date AS created
     15FROM project.projects
     16WHERE client_id = 4
     17ORDER BY created_at DESC;
     18}}}
     19 2. '''Client''' selects one of their projects to see its tasks.
     20 3. '''System''' lists the tasks in that project with status, due date, and the assigned workers:
     21{{{
     22#!sql
     23SELECT t.id, t.title, t.status,
     24       t.due_date::date AS due_date,
     25       COALESCE(string_agg(u.name, ', ' ORDER BY u.name), '(unassigned)') AS assigned_workers
     26FROM project.tasks t
     27LEFT JOIN project.task_workers tw ON tw.task_id = t.id
     28LEFT JOIN project.users u          ON u.id = tw.user_id
     29WHERE t.project_id = 1
     30GROUP BY t.id, t.title, t.status, t.due_date
     31ORDER BY t.id;
     32}}}
     33 4. '''System''' displays the task list; the Client can see, for example, that "Develop landing page" is assigned to Bojan Ilievski and Ivana Petrova, while "Set up hosting" is still unassigned.
     34
     35The LEFT JOINs ensure that tasks with no assigned workers still appear (shown as "(unassigned)"), and string_agg collapses the many-to-many worker assignments into one readable column.