Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- DATE_FORMAT(j.created_on, '%Y-%m-%d') AS "Дата",
- CONCAT(u.lastname, ' ', u.firstname) AS "ФИО",
- COUNT(jd.id) AS "Количество задач",
- SUM(cv.VALUE) AS "Количество StoryPoints"
- FROM journal_details jd
- INNER JOIN journals j ON j.id = jd.journal_id
- INNER JOIN users u ON j.user_id = u.id
- INNER JOIN issues iss ON j.journalized_id = iss.id -- AND iss.tracker_id = 83
- INNER JOIN custom_values cv ON iss.id=cv.customized_id
- WHERE jd.old_value IN (1, 41, 87, 89, 103) -- старый статус "New", "Внутреннее тестирование", "Тестирование на препроде", "Тестирование на проде", "QA.Требования"
- AND jd.VALUE IN (69, 88, 72, 90, 101, 15, 70) -- новый статус "На оценку", "Перенести на препрод", "Перенести на прод", "Dev.Требования", "Аналитика.Запланировано", "Запланировано", "Готово"
- AND jd.prop_key = 'status_id' -- изменение со статусом
- AND u.id IN (1536, 2306, 2433) -- QA Романова, Тюренкова и Сухорукова
- AND cv.custom_field_id = (SELECT id FROM custom_fields cf WHERE name='Изначально StoryPoints')
- GROUP BY 1, 2
- ORDER BY 1 DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement