https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292015-07-02T08:40:25ZRedmineRedmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=646082015-07-02T08:40:25ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li></ul><p>Do you mean time time entry report?<br />And give us more information: <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/Submissions">Submissions</a>.</p> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=646122015-07-02T11:30:42ZStephane Evr
<ul></ul><p>Yes, I mean the time entry report in general, not for a particular project.</p>
<pre>
Environment:
Redmine version 3.0.1.stable.14155
Ruby version 2.2.1-p85 (2015-02-26) [x86_64-linux]
Rails version 4.2.1
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.8
Git 1.9.1
Filesystem
</pre>
<p>here is an extract of my database for enumerations. I found several entries for the same name, which are linked to different projects:<br /><pre>
mysql> select * from enumerations order by name;
+-----+-------------------------------+----------+------------+-------------------+--------+------------+-----------+---------------+
| id | name | position | is_default | type | active | project_id | parent_id | position_name |
+-----+-------------------------------+----------+------------+-------------------+--------+------------+-----------+---------------+
| 11 | Specification | 13 | 0 | TimeEntryActivity | 1 | NULL | NULL | NULL |
| 22 | Specification | 11 | 0 | TimeEntryActivity | 0 | 7 | 11 | NULL |
| 94 | Specification | 62 | 0 | TimeEntryActivity | 0 | 39 | 11 | NULL |
| 123 | Specification | 85 | 0 | TimeEntryActivity | 0 | 38 | 11 | NULL |
| 129 | Specification | 89 | 0 | TimeEntryActivity | 0 | 42 | 11 | NULL |
| 165 | Specification | 119 | 0 | TimeEntryActivity | 0 | 43 | 11 | NULL |
| 19 | Training | 10 | 0 | TimeEntryActivity | 1 | NULL | NULL | NULL |
| 204 | Training | 150 | 0 | TimeEntryActivity | 0 | 54 | 19 | NULL |
| 221 | Training | 166 | 0 | TimeEntryActivity | 0 | 53 | 19 | NULL |
| 238 | Training | 182 | 0 | TimeEntryActivity | 0 | 55 | 19 | NULL |
</pre></p> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=647442015-07-09T08:36:44ZStephane Evr
<ul><li><strong>File</strong> <a href="/attachments/13912">report_activities.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/13912/report_activities.PNG">report_activities.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/13913">report_activities_projects.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/13913/report_activities_projects.PNG">report_activities_projects.PNG</a> added</li></ul><p>Here is what I get for an activity called "Other":</p>
<p><img src="https://www.redmine.org/attachments/download/13912/report_activities.PNG" alt="" /></p>
<p>Now, If I add the "Projects" column (Each line is a different project):</p>
<p><img src="https://www.redmine.org/attachments/download/13913/report_activities_projects.PNG" alt="" /></p> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=651982015-07-30T13:17:06ZToshi MARUYAMA
<ul><li><strong>Category</strong> set to <i>Time tracking</i></li><li><strong>Status</strong> changed from <i>Needs feedback</i> to <i>New</i></li></ul> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=703412016-04-14T06:09:57ZToshi MARUYAMA
<ul></ul><p><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Project specific TimeEntryActivity name not updating properly (Closed)" href="https://www.redmine.org/issues/21056#note-8">#21056#note-8</a> :</p>
<blockquote>
<p>Is a consequence of this issue</p>
</blockquote>
<p>See <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/Submissions">Submissions</a> and give us what plugins you uses.</p> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=703482016-04-14T10:08:00ZStephane Evr
<ul><li><strong>File</strong> <a href="/attachments/15759">1.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15759/1.PNG">1.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/15760">2.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15760/2.PNG">2.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/15762">4.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15762/4.PNG">4.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/15761">3.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15761/3.PNG">3.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/15763">5.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15763/5.PNG">5.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/15764">6.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15764/6.PNG">6.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/15765">7.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15765/7.PNG">7.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/15766">8.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/15766/8.PNG">8.PNG</a> added</li></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Project specific TimeEntryActivity name not updating properly (Closed)" href="https://www.redmine.org/issues/21056#note-8">#21056#note-8</a> :</p>
<blockquote>
<p>Is a consequence of this issue</p>
</blockquote>
<p>See <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/Submissions">Submissions</a> and give us what plugins you uses.</p>
</blockquote>
<p>Could reproduce the bug as described on a freshly launched Bitnami redmine demo instance (<a class="external" href="https://bitnami.com/launch/redmine/aws/now">https://bitnami.com/launch/redmine/aws/now</a>):</p>
<pre>
Environment:
Redmine version 3.2.1.stable
Ruby version 2.1.8-p440 (2015-12-16) [x86_64-linux]
Rails version 4.2.5.2
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.13
Cvs 1.12.13
Git 2.6.1
Filesystem
Redmine plugins:
no plugin installed
</pre>
<p>Steps to follow using a fresh redmine install:</p>
<p>Create a new activity, do not check "Active":</p>
<p><img src="https://www.redmine.org/attachments/download/15759/1.PNG" alt="" /></p>
<p>Create two projects "Test A" and "Test B". Don't need to set any specific param, appart from the "Activities (Time tracking)" tab. Do as follows for each project, then save:</p>
<p><img src="https://www.redmine.org/attachments/download/15760/2.PNG" alt="" /></p>
<p>Now that the activities are activated, time to log some time on each project:</p>
<p><img src="https://www.redmine.org/attachments/download/15761/3.PNG" alt="" /></p>
<p>and</p>
<p><img src="https://www.redmine.org/attachments/download/15762/4.PNG" alt="" /></p>
<p>Then click 1, then 2 on following:</p>
<p><img src="https://www.redmine.org/attachments/download/15763/5.PNG" alt="" /></p>
<p>Then click on the "Report" Button</p>
<p><img src="https://www.redmine.org/attachments/download/15764/6.PNG" alt="" /></p>
<p>Then click "Activity" in the Add section:</p>
<p><img src="https://www.redmine.org/attachments/download/15765/7.PNG" alt="" /></p>
<p>Result:</p>
<p><img src="https://www.redmine.org/attachments/download/15766/8.PNG" alt="" /></p>
<p>I hope these instructions are clear enough to be reproduced :)</p> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=709492016-05-13T12:17:36ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/21056">Defect #21056</a>: Project specific TimeEntryActivity name not updating properly</i> added</li></ul> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=709512016-05-13T12:19:05ZToshi MARUYAMA
<ul><li><strong>Subject</strong> changed from <i>Duplicate activities in time entry report</i> to <i>Duplicate activities in time entry report of project specific TimeEntryActivity</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li><li><strong>Affected version</strong> changed from <i>3.0.1</i> to <i>3.2.2</i></li></ul> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=709552016-05-13T12:38:36ZToshi MARUYAMA
<ul></ul><pre>
mysql> select * from enumerations where name = "test0003";
+----+----------+----------+------------+-------------------+--------+------------+-----------+---------------+
| id | name | position | is_default | type | active | project_id | parent_id | position_name |
+----+----------+----------+------------+-------------------+--------+------------+-----------+---------------+
| 33 | test0003 | 6 | 0 | TimeEntryActivity | 0 | NULL | NULL | NULL |
| 41 | test0003 | 6 | 0 | TimeEntryActivity | 1 | 1 | 33 | NULL |
| 45 | test0003 | 6 | 0 | TimeEntryActivity | 1 | 2 | 33 | NULL |
+----+----------+----------+------------+-------------------+--------+------------+-----------+---------------+
3 rows in set (0.00 sec)
</pre> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=788572017-05-30T09:48:32ZStephane Evr
<ul></ul><p>up</p>
<p>This still happens on Redmine 3.3.0.stable</p> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=1047862021-12-06T05:47:14ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/28503">20018.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/28503/20018.patch">20018.patch</a> added</li></ul><p>I also confirmed(trunk: <a class="changeset" title="Bulgarian translation update (#36280). Patch by Ivan Cenov." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/21299">r21299</a>). I think the following patch will solve it.</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb
index 89b94ec3c4..1cf4604438 100644
</span><span class="gd">--- a/lib/redmine/helpers/time_report.rb
</span><span class="gi">+++ b/lib/redmine/helpers/time_report.rb
</span><span class="p">@@ -122,7 +122,7 @@</span> module Redmine
'tracker' => {:sql => "#{Issue.table_name}.tracker_id",
:klass => Tracker,
:label => :label_tracker},
<span class="gd">- 'activity' => {:sql => "#{TimeEntry.table_name}.activity_id",
</span><span class="gi">+ 'activity' => {:sql => "COALESCE(#{TimeEntryActivity.table_name}.parent_id, #{TimeEntryActivity.table_name}.id)",
</span> :klass => TimeEntryActivity,
:label => :field_activity},
'issue' => {:sql => "#{TimeEntry.table_name}.issue_id",
</code></pre> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=1049022021-12-19T07:33:03ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=1050022021-12-30T09:04:16ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next minor release</i> to <i>4.2.4</i></li></ul><p>Setting the target version to 4.2.4.</p> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=1052872022-01-19T13:34:32ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Duplicate activities in time entry report of project specific TimeEntryActivity</i> to <i>Duplicate activities in time entry report when project-specific activies exist</i></li><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed the patch. Thank you for your contribution.</p> Redmine - Defect #20018: Duplicate activities in time entry report when project-specific activies existhttps://www.redmine.org/issues/20018?journal_id=1054732022-01-29T06:19:34ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>