I’m using Redmine to manage projects and bug reports, I was needing a daily report with spent time by user on each project, nothing complicated, but I wanted a cross-reference result like Excel dynamic tables. As we know, MySQL doesn’t support dynamic cross-reference queries but I make an approach:
1. Write the main query with rows: project identifier, task subject and total hours in a date range.
SELECT p.identifier, e.issue_id, i.subject, round(SUM(e.hours),2) AS total_hours FROM redmine_nsp.time_entries e INNER JOIN redmine_nsp.issues i ON e.issue_id = i.id INNER JOIN …[Read more...]