Defect #20018

Duplicate activities in time entry report of project specific TimeEntryActivity

Added by Stephane Evr over 2 years ago. Updated 5 months ago.

Status:ConfirmedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Time tracking
Target version:-
Resolution: Affected version:3.2.2

Description

When using the report tool by Activity, it appears that some activities are repeated in the list, instead of being aggregated. The activities concerned are all used in several projects.

Example:

Observed:

Activity    Total
X            3
X            4
Y            5
Y            6
Z            7

Expected:

Activity    Total
X            7
Y            11
Z            7

If we apply the filter by projects, then by activities, there are no duplicates, everything works fine:

Project Activity   Total
1       X          3
1       Y          5
2       X          4
2       Y          6
2       Z          7

report_activities.PNG (21 KB) Stephane Evr, 2015-07-09 10:33

report_activities_projects.PNG (27.3 KB) Stephane Evr, 2015-07-09 10:33

1.PNG (7.74 KB) Stephane Evr, 2016-04-14 11:55

2.PNG (16.2 KB) Stephane Evr, 2016-04-14 11:56

3.PNG (11.9 KB) Stephane Evr, 2016-04-14 12:00

4.PNG (11.9 KB) Stephane Evr, 2016-04-14 12:00

5.PNG (10.9 KB) Stephane Evr, 2016-04-14 12:02

6.PNG (26.1 KB) Stephane Evr, 2016-04-14 12:04

7.PNG (17.5 KB) Stephane Evr, 2016-04-14 12:05

8.PNG (24.9 KB) Stephane Evr, 2016-04-14 12:06


Related issues

Related to Redmine - Defect #21056: Project specific TimeEntryActivity name not updating prop... Confirmed

History

#1 Updated by Toshi MARUYAMA over 2 years ago

  • Status changed from New to Needs feedback

Do you mean time time entry report?
And give us more information: Submissions.

#2 Updated by Stephane Evr over 2 years ago

Yes, I mean the time entry report in general, not for a particular project.

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                     

here is an extract of my database for enumerations. I found several entries for the same name, which are linked to different projects:

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          |

#3 Updated by Stephane Evr over 2 years ago

Here is what I get for an activity called "Other":

Now, If I add the "Projects" column (Each line is a different project):

#4 Updated by Toshi MARUYAMA about 2 years ago

  • Category set to Time tracking
  • Status changed from Needs feedback to New

#5 Updated by Toshi MARUYAMA over 1 year ago

#21056#note-8 :

Is a consequence of this issue

See Submissions and give us what plugins you uses.

#6 Updated by Stephane Evr over 1 year ago

Toshi MARUYAMA wrote:

#21056#note-8 :

Is a consequence of this issue

See Submissions and give us what plugins you uses.

Could reproduce the bug as described on a freshly launched Bitnami redmine demo instance (https://bitnami.com/launch/redmine/aws/now):

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

Steps to follow using a fresh redmine install:

Create a new activity, do not check "Active":

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:

Now that the activities are activated, time to log some time on each project:

and

Then click 1, then 2 on following:

Then click on the "Report" Button

Then click "Activity" in the Add section:

Result:

I hope these instructions are clear enough to be reproduced :)

#7 Updated by Toshi MARUYAMA over 1 year ago

  • Related to Defect #21056: Project specific TimeEntryActivity name not updating properly added

#8 Updated by Toshi MARUYAMA over 1 year ago

  • Subject changed from Duplicate activities in time entry report to Duplicate activities in time entry report of project specific TimeEntryActivity
  • Status changed from New to Confirmed
  • Affected version changed from 3.0.1 to 3.2.2

#9 Updated by Toshi MARUYAMA over 1 year ago

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)

#10 Updated by Stephane Evr 5 months ago

up

This still happens on Redmine 3.3.0.stable

Also available in: Atom PDF