Defect #4084

Cannot disable activity in project when activity is active on /enumerations page

Added by Anonymous about 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:2009-10-22
Priority:HighDue date:
Assignee:Eric Davis% Done:

100%

Category:-
Target version:0.9.0
Resolution:Fixed Affected version:

projectSettingsActivities1.jpg (37.2 KB) Anonymous, 2009-10-23 18:00

projectSettingsActivities2.jpg (38.2 KB) Anonymous, 2009-10-23 18:00

projectsettings_activities-3_after-reactivation-and-save.jpg (21.3 KB) Mischa The Evil, 2009-12-14 02:57

enumerations.jpg (28.1 KB) Mischa The Evil, 2009-12-14 02:57

projectsettings_activities-1.jpg (23.8 KB) Mischa The Evil, 2009-12-14 02:57

projectsettings_activities-2_beforesave.jpg (24.7 KB) Mischa The Evil, 2009-12-14 02:57

projectsettings_activities-2_aftersave.jpg (20.9 KB) Mischa The Evil, 2009-12-14 02:57

spenttime.jpg (17.7 KB) Mischa The Evil, 2009-12-14 02:57


Related issues

Related to Redmine - Feature #4077: Custom fields and overrides on Enumerations Closed 2009-10-21

Associated revisions

Revision 3239
Added by Eric Davis almost 8 years ago

Project#activities should check all overridden activities, not just active ones.

Fixes #4084

History

#1 Updated by Jean-Philippe Lang about 8 years ago

Please read SubmittingBugs and give steps to reproduce.

#2 Updated by Anonymous about 8 years ago

After setting project specific activities like on projectSettingsActivities1.jpg (one is active). I expect to see only one option while logging time (projectSettingsActivities2.jpg).
I think it is confusing because to get expected behavior I have to disable all activities on Administration -> Enumerations page.

#3 Updated by Eric Davis about 8 years ago

  • Status changed from New to 7
  • Assignee set to Eric Davis

I'll take a look at it.

#4 Updated by Mischa The Evil almost 8 years ago

I am able to reproduce the issue.

My environment:

[mischa@server xxx]# svn info
Path: .
URL: http://redmine.rubyforge.org/svn/trunk
Repository Root: http://redmine.rubyforge.org/svn
Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81
Revision: 3171
Node Kind: directory
Schedule: normal
Last Changed Author: jplang
Last Changed Rev: 3171
Last Changed Date: 2009-12-13 15:55:17 +0100 (Sun, 13 Dec 2009)

[mischa@server xxx]# svn status
?      public/themes/squeejee

[mischa@server xxx]# ./script/about
About your application's environment
Ruby version              1.8.6 (i686-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.4
Active Record version     2.3.4
Active Resource version   2.3.4
Action Mailer version     2.3.4
Active Support version    2.3.4
Application root          /xxx
Environment               production
Database adapter          mysql
Database schema version   20091205124427

[mischa@server xxx]# mysql --version
mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline 4.3

Steps to reproduce (with screenshots):

  1. My activity-enumerations are set like:

     
  2. By default the random project's (here child2-1) activities settings look like:

     
  3. On the random project (here child2-1) I want to disable the Development-activity, thus I deselect the checkbox for that activity. Before I click "save" the screen looks like:

     
  4. After I've clicked "save" the screen looks like below (notice the removed system activity tick):

    If I now take a look at my global activity-enumerations they still are configured as in step 1's screenshot.
     
  5. Although I have disabled the Development-activity in steps 3 and 4 I still see the activity in the spenttime-view's activities-dropdown:

     
  6. Also: when I now go back to the project's activities settings, re-activate the Development-activity and "save", I get the following config:

    The only way to get the removed system activity tick back is to reset all the project's activities using the dedicated text-button.

Feedback from the logs:

The logs which are written during steps 3 and 4 look like:

Processing ProjectsController#settings (for 192.168.1.2 at 2009-12-14 07:08:31) [GET]
  Parameters: {"action"=>"settings", "id"=>"child2-1", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/settings
Completed in 1293ms (View: 1214, DB: 47) | 200 OK [http://xxx/projects/child2-1/settings]

Processing ProjectsController#save_activities (for 192.168.1.2 at 2009-12-14 07:08:47) [POST]
  Parameters: {"enumerations"=>{"8"=>{"parent_id"=>"8", "active"=>"1"}, "9"=>{"parent_id"=>"9", "active"=>"0"}}, "commit"=>"Save", "action"=>"save_activities", "authenticity_token"=>"RemovedForSecurityReasons", "id"=>"child2-1", "controller"=>"projects"}
Redirected to http://xxx/projects/child2-1/settings/activities
Completed in 78ms (DB: 35) | 302 Found [http://xxx/projects/child2-1/activities/save]

Processing ProjectsController#settings (for 192.168.1.2 at 2009-12-14 07:08:47) [GET]
  Parameters: {"action"=>"settings", "id"=>"child2-1", "controller"=>"projects", "tab"=>"activities"}
Rendering template within layouts/base
Rendering projects/settings
Completed in 508ms (View: 443, DB: 42) | 200 OK [http://xxx/projects/child2-1/settings/activities]

 
Hope this is enough information to further debug this issue. If any more info in required to fix this issue, please let me know. I'm happy to provide further details where needed.

Regards, Mischa.

#5 Updated by Eric Davis almost 8 years ago

  • Target version set to 0.9.0

Mischa The Evil wrote:

  1. Although I have disabled the Development-activity in steps 3 and 4 I still see the activity in the spenttime-view's activities-dropdown:

That's a bug. I suspect it's mixing the system Development activity into the project one.

The only way to get the removed system activity tick back is to reset all the project's activities using the dedicated text-button.

That's the correct behavior.

Thanks Mischa, that helps pinpoint the issue. I'll try to have it fixed for 0.9.

#6 Updated by Jean-Philippe Lang almost 8 years ago

  • Priority changed from Normal to High

#7 Updated by Eric Davis almost 8 years ago

  • Status changed from 7 to Closed
  • % Done changed from 0 to 100
  • Resolution set to Fixed

Fixed in r3239. The project was checking for only active project level activities that overrode the system activities. In Mischa's example, this meant that the Project didn't see the project level "Development" so it used the system one.

Also available in: Atom PDF