Showing entries 1 to 2
Displaying posts with tag: redmine (reset)
An approach to MySQL dynamic cross-reference query

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 redmine_nsp.projects p ON e.project_id = p.id
        WHERE e.spent_on BETWEEN '2014-07-01' AND '2014-07-07'
 GROUP BY p.identifier,e.issue_id;
+------------+----------+----------------------------+-------------+
| identifier | issue_id | subject                    | total_hours | …
[Read more]
Redmine with MariaDB

I'm in the process of setting up Redmine (version 1.0-stable) on an Ubuntu 8.04 virtual machine. Getting a recent enough gem and rails is less fun than you might imagine, but the big issue I came across was a bug in the database model, which makes MySQL 5.1 (MariaDB 5.1 in my case) barf on installation.

There is a fix, but I am running from a git clone didn't want to download and apply a diff file to that repository. A quick google found what I need: the git cherry-pick command. It allows you to grab a single commit and apply its changes to your branch. In my case:

git cherry-pick  …
[Read more]
Showing entries 1 to 2