Files
sogoms/config/scenarios/prokov/tasks/list.yaml
Pierre 7e27f87d6f Initial commit - SOGOMS v1.0.0
- sogoctl: supervisor avec health checks et restart auto
- sogoway: gateway HTTP, auth JWT, routing par hostname
- sogoms-db: microservice MariaDB avec pool par application
- Protocol IPC Unix socket JSON length-prefixed
- Config YAML multi-application (prokov)
- Deploy script pour container Alpine gw3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 19:09:00 +01:00

68 lines
1.7 KiB
YAML

# Scénario: Liste des tâches
name: tasks_list
version: "1.0"
description: Retourne les tâches avec filtres optionnels
input:
optional:
- project_id
- status_id
- tag_id
- date_start
- date_end
validation:
project_id:
type: int
status_id:
type: int
tag_id:
type: int
date_start:
type: string
format: date
date_end:
type: string
format: date
steps:
- id: get_tasks
service: db
action: query
params:
query: |
SELECT t.*,
p.name as project_name,
s.name as status_name,
s.color as status_color,
GROUP_CONCAT(tg.id) as tag_ids,
GROUP_CONCAT(tg.name) as tag_names,
GROUP_CONCAT(tg.color) as tag_colors
FROM tasks t
LEFT JOIN projects p ON t.project_id = p.id
LEFT JOIN statuses s ON t.status_id = s.id
LEFT JOIN task_tags tt ON t.id = tt.task_id
LEFT JOIN tags tg ON tt.tag_id = tg.id
WHERE t.user_id = ?
AND (? IS NULL OR t.project_id = ?)
AND (? IS NULL OR t.status_id = ?)
AND (? IS NULL OR t.date_start >= ?)
AND (? IS NULL OR t.date_end <= ?)
GROUP BY t.id
ORDER BY t.position ASC, t.priority DESC, t.created_at DESC
args:
- "{{auth.user_id}}"
- "{{input.project_id}}"
- "{{input.project_id}}"
- "{{input.status_id}}"
- "{{input.status_id}}"
- "{{input.date_start}}"
- "{{input.date_start}}"
- "{{input.date_end}}"
- "{{input.date_end}}"
output:
status: 200
body:
success: true
data: "{{steps.get_tasks.result | parse_tags}}"