<?xml version="1.0" encoding="UTF-8"?>
<posts type="array">
  <post>
    <body>&lt;p&gt;though the latest (0.9.x) versions of &lt;a href=&quot;http://www.redmine.org&quot;&gt;Redmine&lt;/a&gt; definitely has improved issues display, still some columns are missing from the view, such as the time spent already and projections of the total time (or time remaining) based on the original estimate, time inputted already and the completion ratio.&lt;/p&gt;
&lt;p&gt;below is my dirty &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; workaround for getting these base numbers out for simple maths:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
&lt;code class=&quot;sql&quot;&gt;
SELECT distinct i.id, fixed_version_id, estimated_hours, done_ratio, SUM(te.hours) AS time_spent, subject 
FROM issues i 
    LEFT OUTER JOIN time_entries te ON i.id = te.issue_id 
WHERE i.project_id = ${project}
GROUP BY i.id 
ORDER BY fixed_version_id ASC, id ASC;
&lt;/code&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;em&gt;where ${project} is your selected project;&lt;/em&gt;&lt;br /&gt;
_ or also one can remove condition, add ordering by &lt;strong&gt;i.project_id&lt;/strong&gt; and see all projects (also could put any other columns there)_&lt;/p&gt;
&lt;p&gt;or do already the simple math for doing linear projections of the remaining time estimate based on the original or on the already spent time:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
&lt;code class=&quot;sql&quot;&gt;
SELECT DISTINCT i.id, fixed_version_id, estimated_hours, done_ratio, 
                SUM(te.hours) AS time_spent, 
                (CASE done_ratio WHEN 100 THEN 0 ELSE (estimated_hours*(100-done_ratio)/100) END) AS rem_est_est, 
                (CASE done_ratio WHEN 100 THEN 0 ELSE (SUM(te.hours)*(100/done_ratio)-SUM(te.hours)) END) AS rem_est_done, 
                subject 
FROM issues i LEFT OUTER JOIN time_entries te ON i.id = te.issue_id WHERE i.project_id = ${project} 
GROUP BY i.id 
ORDER BY fixed_version_id ASC, id ASC
&lt;/code&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;these &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; statements were tested on MySQL, but supposed to work without modification on PostgreSQ. tested with redmine versions 0.8 &amp;#8211; 0.9.2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;this would result a table like this.&lt;/p&gt;
&lt;table style=&quot;border:1px solid gray;&quot;&gt;
	&lt;tr&gt;
		&lt;td&gt;id&lt;/td&gt;
		&lt;td&gt;fixed_version_id&lt;/td&gt;
		&lt;td&gt;estimated_hours&lt;/td&gt;
		&lt;td&gt;done_ratio&lt;/td&gt;
		&lt;td&gt;time_spent&lt;/td&gt;
		&lt;td&gt;rem_est_est&lt;/td&gt;
		&lt;td&gt;rem_est_done&lt;/td&gt;
		&lt;td&gt;subject&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;1&lt;/td&gt;
		&lt;td&gt;&lt;span class=&quot;caps&quot;&gt;NULL&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;80&lt;/td&gt;
		&lt;td&gt;0&lt;/td&gt;
		&lt;td&gt;&lt;span class=&quot;caps&quot;&gt;NULL&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;80&lt;/td&gt;
		&lt;td&gt;&lt;span class=&quot;caps&quot;&gt;NULL&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;an unstarted issue with estimate&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;2&lt;/td&gt;
		&lt;td&gt;&lt;span class=&quot;caps&quot;&gt;NULL&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;&lt;span class=&quot;caps&quot;&gt;NULL&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;0&lt;/td&gt;
		&lt;td&gt;&lt;span class=&quot;caps&quot;&gt;NULL&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;&lt;span class=&quot;caps&quot;&gt;NULL&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;&lt;span class=&quot;caps&quot;&gt;NULL&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;unstarted issue without estimate&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;3&lt;/td&gt;
		&lt;td&gt;3&lt;/td&gt;
		&lt;td&gt;5&lt;/td&gt;
		&lt;td&gt;100&lt;/td&gt;
		&lt;td&gt;4.70000004023314&lt;/td&gt;
		&lt;td&gt;0&lt;/td&gt;
		&lt;td&gt;0&lt;/td&gt;
		&lt;td&gt;completed issue 1&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;6&lt;/td&gt;
		&lt;td&gt;3&lt;/td&gt;
		&lt;td&gt;8&lt;/td&gt;
		&lt;td&gt;100&lt;/td&gt;
		&lt;td&gt;12.1599999666214&lt;/td&gt;
		&lt;td&gt;0&lt;/td&gt;
		&lt;td&gt;0&lt;/td&gt;
		&lt;td&gt;completed issue 2&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;4&lt;/td&gt;
		&lt;td&gt;4&lt;/td&gt;
		&lt;td&gt;4&lt;/td&gt;
		&lt;td&gt;30&lt;/td&gt;
		&lt;td&gt;1.30000002682209&lt;/td&gt;
		&lt;td&gt;2.8&lt;/td&gt;
		&lt;td&gt;3.033290062584&lt;/td&gt;
		&lt;td&gt;issue progressing slightly worse than estimated&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;5&lt;/td&gt;
		&lt;td&gt;4&lt;/td&gt;
		&lt;td&gt;6&lt;/td&gt;
		&lt;td&gt;10&lt;/td&gt;
		&lt;td&gt;1.89999997615814&lt;/td&gt;
		&lt;td&gt;5.4&lt;/td&gt;
		&lt;td&gt;17.099999785423&lt;/td&gt;
		&lt;td&gt;issue progressing much worse than estimated&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;7&lt;/td&gt;
		&lt;td&gt;4&lt;/td&gt;
		&lt;td&gt;16&lt;/td&gt;
		&lt;td&gt;60&lt;/td&gt;
		&lt;td&gt;7.95000000298023&lt;/td&gt;
		&lt;td&gt;6.4&lt;/td&gt;
		&lt;td&gt;5.3002650019869&lt;/td&gt;
		&lt;td&gt;issue progressing better than estimated&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;8&lt;/td&gt;
		&lt;td&gt;4&lt;/td&gt;
		&lt;td&gt;3&lt;/td&gt;
		&lt;td&gt;90&lt;/td&gt;
		&lt;td&gt;1.5&lt;/td&gt;
		&lt;td&gt;0.3&lt;/td&gt;
		&lt;td&gt;0.16665&lt;/td&gt;
		&lt;td&gt;issue progressing much better than estimated&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;how realistic are these figures?&lt;/strong&gt; i do not know &amp;#8212; it all comes down to the issue specs. the high resolution and precisely detailed issue specification is the key factor to increase the precision of initial and ongoing estimates (completion ratio), generally speaking. however there could be an entire post about it&amp;#8230;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;anyway, back to the original topic; the above &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; is good enough for me to keep tracking how my &amp;#8211; often lousily specified issues &amp;#8211; keep progressing &amp;#8211; as the specs are getting refined as well as work is being done on the issues &amp;#8211; so i can have a better idea of where the project will end up (in terms of time spent) than if i just look at the remaining (original) estimate.&lt;/p&gt;
&lt;p&gt;however, one can think of many other things to do here, eg. interpolate time entries to get another projected total time per issue / project, or calculate projected estimate for non-started tasks based on the original estimate and the precision of original estimates in the project (based on closed tasks). i have no need for that stuff right now, and no time to play with it just for fun (though would be interesting to see), maybe another time&amp;#8230; :)&lt;/p&gt;</body>
    <created-at type="datetime">2010-02-10T11:47:41Z</created-at>
    <excerpt>quick-and-dirty solution to get projected estimates from redmine (based on completion ratio and work done already)</excerpt>
    <id type="integer">2</id>
    <public type="boolean">true</public>
    <title>get time estimates from redmine</title>
    <updated-at type="datetime">2010-02-10T12:26:41Z</updated-at>
    <user-id type="integer">6</user-id>
  </post>
  <post>
    <body>&lt;p&gt;well, i am not a cobbler, actually&amp;#8230; just another busy software engineer that wonders every once in a while why his own website looks like crap /if there is a website at all :)/&amp;#8230;&lt;/p&gt;
&lt;p&gt;having my personal page up with &lt;a href=&quot;http://wordpress.org&quot;&gt;wordpress&lt;/a&gt; for some time now, i felt a little less pressure to do anything about it. however, doing plenty of rails stuff for some time now, started to wonder why i should keep running my site on wp and not just create something simple and stupid in rails.&lt;/p&gt;
&lt;p&gt;so here it goes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://dev.mobility.ws:4443/projects/show/yaqrb&quot;&gt;project page&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;this is free software, so feel free to grab it if you need something like this.&lt;/p&gt;
&lt;pre&gt;
git clone git://git.mobility.ws/yaqrb.git
&lt;/pre&gt;</body>
    <created-at type="datetime">2010-02-05T22:59:11Z</created-at>
    <excerpt>as masses confirm, the old say proves to be true. i can confirm too. but - speaking for myself - i am about to fix it...</excerpt>
    <id type="integer">1</id>
    <public type="boolean">true</public>
    <title>The Cobbler's Children Have No Shoes</title>
    <updated-at type="datetime">2010-02-06T16:51:10Z</updated-at>
    <user-id type="integer">6</user-id>
  </post>
</posts>
