Bug #470
Orangutan records vs. Charts info
100%
Description
Something wrong with Log Records from Redmine and Orangutan.
@ On Chart bars IS NOT SHOWN INFO FROM Orangutan
@
Here is test variants:
A) Certain existed issue
1) You have issue
2) You have logged time entries from Redmine
3) You have time entires from Orangutan
4) ON Charts (Logged hours deviations) IS SHOWN ONLY time information from Redmine
#431 (Logged from redmine and Orangutan)
B) Create new issue in Redmine
1) Log(track) time from Orangutan to this issue
2) As result issue is not SHOWN in Charts. (new issue from redmine )
#432 (logged from Orangutan - not visible in Charts),
#434 (logged only from redmine)
C) If you have project, and you have no LOG records from Redmine, BUT only from Orangutan, reported issues will not shown in Charts
PS. There is trick - ISSUE will shown in CHARTS if it has ESTIMATED time.
Every issues, I’ve created, is coming with estimated time.
History
#1 Updated by Andriy Lesyuk over 14 years ago
- Target version set to 1.02
#2 Updated by Andriy Lesyuk over 14 years ago
- Target version changed from 1.02 to 1.01
#3 Updated by Andriy Lesyuk over 14 years ago
In my project all time entries were made with Orangutan and chart does shows the corresponding issues (while not all logged hours are shown).
So I believe the problem is not in Orangtan but rather in some specific data in some time entries...
#4 Updated by Andriy Lesyuk over 14 years ago
Ok. This somehow depends on chart_time_entries table. Orangutan writes nothing to this table! Currently I’m not sure if it should... It looks like Redmine does it by itself (some Orangutan hours got there others didn’t).
This is the query Redmine uses to get statistics for chart:
SELECT SUM(logged_hours) AS logged_hours, SUM(entries) AS entries, chart_time_entries.issue_id AS group_id, issue_id AS grouping, issues.estimated_hours AS estimated_hours, issues.subject AS subject, chart_time_entries.issue_id AS root_id, null AS parent_id FROM chart_time_entries LEFT JOIN issues ON issues.id = issue_id WHERE ( chart_time_entries.month = 0 AND chart_time_entries.week = 0 AND chart_time_entries.day = 0 AND chart_time_entries.project_id IN (23) ) GROUP BY chart_time_entries.issue_id, issues.estimated_hours, issues.subject ORDER BY 1 DESC, 3 ASC
#5 Updated by Andriy Lesyuk over 14 years ago
Думаю, Redmine час від часу обновлює вміст таблиці chart_time_entries:
SELECT spent_on, CONCAT('2010', DAYOFYEAR(spent_on)) AS yday, TRUNCATE(SUM(hours), 2) AS hours, TRUNCATE((SELECT logged_hours FROM chart_time_entries WHERE issue_id = 246 AND user_id = 34 AND day = yday), 2) AS logged_hours, COUNT(*) AS count, (SELECT entries FROM chart_time_entries WHERE issue_id = 246 AND user_id = 34 AND day = yday) AS entries FROM time_entries WHERE issue_id = 246 AND user_id = 34 GROUP BY yday;
+------------+---------+-------+--------------+-------+---------+ | spent_on | yday | hours | logged_hours | count | entries | +------------+---------+-------+--------------+-------+---------+ | 2010-04-28 | 2010118 | 3.15 | 3.15 | 2 | 2 | | 2010-04-29 | 2010119 | 8.00 | 8.00 | 1 | 1 | | 2010-05-04 | 2010124 | 3.11 | 3.11 | 1 | 1 | | 2010-05-05 | 2010125 | 7.67 | 7.67 | 2 | 2 | | 2010-05-06 | 2010126 | 8.00 | 8.00 | 2 | 2 | | 2010-05-07 | 2010127 | 7.76 | 7.76 | 3 | 3 | | 2010-05-11 | 2010131 | 8.00 | 8.00 | 2 | 2 | | 2010-05-12 | 2010132 | 7.91 | 7.92 | 2 | 2 | | 2010-05-13 | 2010133 | 7.88 | 7.88 | 3 | 3 | | 2010-05-14 | 2010134 | 7.92 | 7.92 | 1 | 1 | | 2010-05-17 | 2010137 | 7.92 | 7.92 | 1 | 1 | | 2010-05-18 | 2010138 | 5.90 | 5.90 | 2 | 2 | | 2010-05-19 | 2010139 | 6.71 | 6.71 | 3 | 3 | | 2010-05-20 | 2010140 | 6.42 | 6.42 | 2 | 2 | | 2010-05-21 | 2010141 | 7.50 | 7.50 | 2 | 2 | | 2010-05-25 | 2010145 | 7.98 | 1.95 | 3 | 1 | | 2010-05-26 | 2010146 | 7.65 | NULL | 3 | NULL | | 2010-05-27 | 2010147 | 7.76 | NULL | 5 | NULL | | 2010-05-28 | 2010148 | 6.50 | NULL | 2 | NULL | | 2010-05-31 | 2010151 | 4.61 | NULL | 2 | NULL | | 2010-06-01 | 2010152 | 7.65 | NULL | 2 | NULL | | 2010-06-02 | 2010153 | 8.00 | NULL | 3 | NULL | | 2010-06-03 | 2010154 | 4.26 | NULL | 1 | NULL | | 2010-06-04 | 2010155 | 7.95 | NULL | 4 | NULL | | 2010-06-07 | 2010158 | 5.90 | NULL | 1 | NULL | +------------+---------+-------+--------------+-------+---------+
Цікаво, на яких умовах це робиться... Можливо і варто щось таке робити в Орангутані...
#6 Updated by Andriy Lesyuk over 14 years ago
Потрібна допомога, щоб зрозуміти що воно робить:
vendor/plugins/redmine_charts/lib/redmine_charts/time_entry_patch.rb
Треба чи не треба Орангутану “оновлювати” відповідні записи таблиці chart_time_entries?
#7 Updated by Andriy Lesyuk over 14 years ago
Таки треба...
#8 Updated by Andriy Lesyuk over 14 years ago
- Status changed from Open to Closed
This is not a bug in Redmine...
#9 Updated by Andriy Lesyuk over 14 years ago
- Status changed from Closed to In Progress
#10 Updated by Andriy Lesyuk over 14 years ago
- % Done changed from 0 to 30
- Start date set to 09 Jun 2010
#11 Updated by Andriy Lesyuk over 14 years ago
A query to detect incorrect/missing entries in chart_time_entries table:
SELECT (YEAR(spent_on) * 1000 + DAYOFYEAR(spent_on)) AS day, (YEAR(spent_on) * 1000 + WEEKOFYEAR(spent_on)) AS week, (YEAR(spent_on) * 1000 + MONTH(spent_on)) AS month, ROUND(SUM(hours), 2) AS logged_hours, logged_hours, COUNT(time_entries.id) AS entries, entries, time_entries.user_id, time_entries.issue_id, time_entries.activity_id, time_entries.project_id FROM time_entries LEFT JOIN chart_time_entries ON day = (YEAR(spent_on) * 1000 + DAYOFYEAR(spent_on)) AND chart_time_entries.user_id = time_entries.user_id AND chart_time_entries.issue_id = time_entries.issue_id AND chart_time_entries.activity_id = time_entries.activity_id AND chart_time_entries.project_id = time_entries.project_id GROUP BY spent_on, time_entries.user_id, time_entries.issue_id, time_entries.activity_id, time_entries.project_id
#12 Updated by Andriy Lesyuk over 14 years ago
- % Done changed from 30 to 100
- Status changed from In Progress to Closed
- Due date set to 11 Jun 2010
#13 Updated by Andriy Lesyuk almost 14 years ago
- Project changed from Orangutan to Orangutan::Redmine
#14 Updated by Andriy Lesyuk almost 14 years ago
- File Screenshot-11.png View added
- File Screenshot-9.png View added
- File 432.png View added
- File ShownIssuesInCharts.png View added