https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-10-22T17:50:55ZRedmineRedmine - Defect #4084: Cannot disable activity in project when activity is active on /enumerations pagehttps://www.redmine.org/issues/4084?journal_id=115372009-10-22T17:50:55ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Please read <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/SubmittingBugs">SubmittingBugs</a> and give steps to reproduce.</p> Redmine - Defect #4084: Cannot disable activity in project when activity is active on /enumerations pagehttps://www.redmine.org/issues/4084?journal_id=115502009-10-23T16:00:37ZAnonymous
<ul><li><strong>File</strong> <a href="/attachments/2683">projectSettingsActivities1.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2683/projectSettingsActivities1.jpg">projectSettingsActivities1.jpg</a> added</li><li><strong>File</strong> <a href="/attachments/2684">projectSettingsActivities2.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2684/projectSettingsActivities2.jpg">projectSettingsActivities2.jpg</a> added</li></ul><p>After setting project specific activities like on projectSettingsActivities1.jpg (one is active). I expect to see only one option while logging time (projectSettingsActivities2.jpg).<br />I think it is confusing because to get expected behavior I have to disable all activities on Administration -> Enumerations page.</p> Redmine - Defect #4084: Cannot disable activity in project when activity is active on /enumerations pagehttps://www.redmine.org/issues/4084?journal_id=116392009-10-27T00:51:46ZEric Davis
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>7</i></li><li><strong>Assignee</strong> set to <i>Eric Davis</i></li></ul><p>I'll take a look at it.</p> Redmine - Defect #4084: Cannot disable activity in project when activity is active on /enumerations pagehttps://www.redmine.org/issues/4084?journal_id=129342009-12-14T01:57:57ZMischa The Evil
<ul><li><strong>File</strong> <a href="/attachments/2889">projectsettings_activities-3_after-reactivation-and-save.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2889/projectsettings_activities-3_after-reactivation-and-save.jpg">projectsettings_activities-3_after-reactivation-and-save.jpg</a> added</li><li><strong>File</strong> <a href="/attachments/2890">enumerations.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2890/enumerations.jpg">enumerations.jpg</a> added</li><li><strong>File</strong> <a href="/attachments/2891">projectsettings_activities-1.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2891/projectsettings_activities-1.jpg">projectsettings_activities-1.jpg</a> added</li><li><strong>File</strong> <a href="/attachments/2892">projectsettings_activities-2_beforesave.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2892/projectsettings_activities-2_beforesave.jpg">projectsettings_activities-2_beforesave.jpg</a> added</li><li><strong>File</strong> <a href="/attachments/2893">projectsettings_activities-2_aftersave.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2893/projectsettings_activities-2_aftersave.jpg">projectsettings_activities-2_aftersave.jpg</a> added</li><li><strong>File</strong> <a href="/attachments/2894">spenttime.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2894/spenttime.jpg">spenttime.jpg</a> added</li></ul><p>I am able to reproduce the issue.</p>
<a name="My-environment"></a>
<h2 >My environment:<a href="#My-environment" class="wiki-anchor">¶</a></h2>
<pre>
[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
</pre>
<a name="Steps-to-reproduce-with-screenshots"></a>
<h2 >Steps to reproduce (with screenshots):<a href="#Steps-to-reproduce-with-screenshots" class="wiki-anchor">¶</a></h2>
<ol>
<li>My activity-enumerations are set like:<br /><img src="https://www.redmine.org/attachments/download/2890/enumerations.jpg" alt="" /><br /> </li>
<li>By default the random project's (here <em>child2-1</em>) activities settings look like:<br /><img src="https://www.redmine.org/attachments/download/2891/projectsettings_activities-1.jpg" alt="" /><br /> </li>
<li>On the random project (here <em>child2-1</em>) I want to disable the <code>Development</code>-activity, thus I deselect the checkbox for that activity. <strong>Before</strong> I click "save" the screen looks like:<br /><img src="https://www.redmine.org/attachments/download/2892/projectsettings_activities-2_beforesave.jpg" alt="" /><br /> </li>
<li><strong>After</strong> I've clicked "save" the screen looks like below (notice the removed system activity tick):<br /><img src="https://www.redmine.org/attachments/download/2893/projectsettings_activities-2_aftersave.jpg" alt="" /><br />If I now take a look at my global activity-enumerations they still are configured as in step 1's screenshot.<br /> </li>
<li>Although I have disabled the <code>Development</code>-activity in steps 3 and 4 I still see the activity in the spenttime-view's activities-dropdown:<br /><img src="https://www.redmine.org/attachments/download/2894/spenttime.jpg" alt="" /><br /> </li>
<li>Also: when I now go back to the project's activities settings, re-activate the <code>Development</code>-activity and "save", I get the following config:<br /><img src="https://www.redmine.org/attachments/download/2889/projectsettings_activities-3_after-reactivation-and-save.jpg" alt="" /><br />The only way to get the removed system activity tick back is to <strong>reset</strong> all the project's activities using the dedicated text-button.</li>
</ol>
<a name="Feedback-from-the-logs"></a>
<h2 >Feedback from the logs:<a href="#Feedback-from-the-logs" class="wiki-anchor">¶</a></h2>
<p>The logs which are written during steps 3 and 4 look like:</p>
<pre>
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]
</pre>
<p> <br />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.</p>
<p>Regards, Mischa.</p> Redmine - Defect #4084: Cannot disable activity in project when activity is active on /enumerations pagehttps://www.redmine.org/issues/4084?journal_id=130172009-12-17T01:14:57ZEric Davis
<ul><li><strong>Target version</strong> set to <i>0.9.0</i></li></ul><p>Mischa The Evil wrote:</p>
<blockquote>
<ol>
<li>Although I have disabled the <code>Development</code>-activity in steps 3 and 4 I still see the activity in the spenttime-view's activities-dropdown:<br /><img src="https://www.redmine.org/attachments/download/2894/spenttime.jpg" alt="" /></li>
</ol>
</blockquote>
<p>That's a bug. I suspect it's mixing the system Development activity into the project one.</p>
<blockquote>
<p>The only way to get the removed system activity tick back is to <strong>reset</strong> all the project's activities using the dedicated text-button.</p>
</blockquote>
<p>That's the correct behavior.</p>
<p>Thanks Mischa, that helps pinpoint the issue. I'll try to have it fixed for 0.9.</p> Redmine - Defect #4084: Cannot disable activity in project when activity is active on /enumerations pagehttps://www.redmine.org/issues/4084?journal_id=132192009-12-23T20:06:02ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li></ul> Redmine - Defect #4084: Cannot disable activity in project when activity is active on /enumerations pagehttps://www.redmine.org/issues/4084?journal_id=132392009-12-24T18:23:14ZEric Davis
<ul><li><strong>Status</strong> changed from <i>7</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Fixed in <a class="changeset" title="Project#activities should check all overridden activities, not just active ones. Fixes #4084" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3239">r3239</a>. 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.</p>