Vote #76837
完了Project specific TimeEntryActivity name not updating properly
0%
説明
In Enumerations, create a new TimeEntryActivity with these settings:
!enum_01.PNG!
Go in a project / settings / Activities (time tracking) the activity is listed properly:
!enum_02.PNG!
Enable the activity, and save.
Then, in the Enumerations page, change the name of the activity and save.
!enum_04.PNG!
Now, go back to project / settings / Activities (time tracking):
!enum_03.PNG!
Expected: The name of the activity should be updated to the new name (Test B).
Note that I can force the update by clicking on the "Reset" button on the same page, but I then loose all of my other activities settings for the project...
journals
Affected version is 3.1.0 (Not tested on 3.1.1)
--------------------------------------------------------------------------------
I cannot reproduce.
Project setting page uses tabs, so you need to reload this page.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> I cannot reproduce.
On version:3.1.2.
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> I cannot reproduce.
> Project setting page uses tabs, so you need to reload this page.
Same problem after reloading the page, I will test with version:3.1.2 to see if it is fixed.
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> Toshi MARUYAMA wrote:
> > I cannot reproduce.
> On version:3.1.2.
Could reproduce the issue on @3.2.1-stable@... I followed exactly the steps as described.
--------------------------------------------------------------------------------
Note that I think this issue is really annoying. This means that the projects will always keep the old activity names, resulting in discrepancies in the time entry activities reports...
--------------------------------------------------------------------------------
#20018 Is a consequence of this issue
--------------------------------------------------------------------------------
See [[Submissions]].
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> See [[Submissions]].
Could reproduce the bug as described on a freshly launched Bitnami redmine demo instance (https://bitnami.com/launch/redmine/aws/now):
<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>
--------------------------------------------------------------------------------
I still cannot reproduce on vanilla Redmine.
<pre>
Environment:
Redmine version 3.2.2.stable
Ruby version 2.1.8-p440 (2015-12-16) [x86_64-linux]
Rails version 4.2.5.2
Environment production
Database adapter SQLite
SCM:
Subversion 1.6.11
Darcs 2.2.0
Mercurial 2.8.2
Cvs 1.12.13
Bazaar 2.1.1
Git 1.7.1
Filesystem
Redmine plugins:
no plugin installed
</pre>
--------------------------------------------------------------------------------
I still cannot reproduce on vanilla Redmine *MySQL*, too.
<pre>
Environment:
Redmine version 3.2.2.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.6.11
Darcs 2.2.0
Mercurial 2.8.2
Cvs 1.12.13
Bazaar 2.1.1
Git 1.7.1
Filesystem
Redmine plugins:
no plugin installed
</pre>
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
<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>
--------------------------------------------------------------------------------
Could reproduce on:
<pre>
Environment:
Redmine version 3.3.0.stable
Ruby version 2.1.10-p492 (2016-04-01) [x86_64-linux]
Rails version 4.2.6
Environment production
Database adapter Mysql2
SCM:
Subversion 1.9.4
Cvs 1.12.13
Git 2.7.4
Filesystem
Redmine plugins:
no plugin installed
</pre>
--------------------------------------------------------------------------------
The issue still reproduces on 3.4.1.
--------------------------------------------------------------------------------
Problem still exists in 4.0.4 - stable.
Any change to have a fix or a workaround ?
What I don't understand, in my case some projects only use the system activities (IOW enumerations with parent_id = NULL) and other projects use duplicate activities (activities with parent_id != NULL).
Any explanation about system versus project activities logic in redmine is welcome, it will help me to understand and propose a fix.
Thanks in advance.
--------------------------------------------------------------------------------
Let's take the data of #21056#note-15 as an example.
"Administration> Enumerations> Activities (time tracking) New value" will create data like 33.
Then, when you save the settings for each project, data with project_id such as 41 or 45 will be generated.
I expect the 41 and 45 names to be updated when the 33 name is updated, but that's not really the case.
I have attached a patch that will automatically update 41 and 45 names when 33 name is updated.
Since the bug that the name is not updated has existed for a long time, it is possible that there is a project that has been used for a long time without being renamed.
I thought that it might be a problem if I change it suddenly with this change, so I try not to update the ones whose names are already inconsistent.(name: self.name_before_last_save)
--------------------------------------------------------------------------------
I fixed it because it contained unnecessary code.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Setting the target version to 5.0.0.
--------------------------------------------------------------------------------
Committed the patch. Thank you for fixing the issue.
--------------------------------------------------------------------------------
related_issues
relates,Closed,20018,Duplicate activities in time entry report when project-specific activies exist