https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-04-09T01:02:45ZRedmineRedmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=85702009-04-09T01:02:45ZEric 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><li><strong>Estimated time</strong> deleted (<del><i>0.50 h</i></del>)</li></ul><p>I've got something like this hacked onto my site right now that I can extract and cleanup a bit.</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=87382009-04-20T22:14:00ZTim Klein
<ul></ul><p>any news?</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=217552010-10-25T15:02:26ZEric Davis
<ul><li><strong>Assignee</strong> deleted (<del><i>Eric Davis</i></del>)</li></ul> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=281712011-04-20T08:58:28ZAnton Nepomnyaschih
<ul></ul><p>+1 It would be very good to get this, as we have to hide our estimations from some roles :(</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=294482011-06-01T15:35:37ZMarc Lindsay
<ul></ul><p>+1 on this one!</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=338952011-11-19T13:31:08ZNilson Uehara
<ul></ul><p>+1</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=339082011-11-19T22:58:07ZTerence Mill
<ul></ul><p>is covered by <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Mightful workflow field enhancement: visible, read only and mandatory (Closed)" href="https://www.redmine.org/issues/8050">#8050</a></p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=356612012-01-31T13:50:22ZDominique Lederer
<ul></ul><p>made a plugin for this: <a class="external" href="http://www.redmine.org/plugins/redmine_hide_estimated_hours">http://www.redmine.org/plugins/redmine_hide_estimated_hours</a></p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=431812012-12-03T17:46:40ZPavel Bahushevich
<ul></ul><p>does anybody have version 1.0.0 of this plugin?</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=442322013-01-13T20:04:16ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>7</i> to <i>New</i></li></ul><p>Assigned issue with no assignee back to New status.</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=893812019-01-14T04:31:10ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/3781">Feature #3781</a>: Add permission to control viewing of Estimated Hours based on Role</i> added</li></ul> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=893842019-01-14T04:32:00ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/15107">Feature #15107</a>: Add a permission option to view estimated hours</i> added</li></ul> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=893922019-01-14T12:48:51ZMarius BÄ‚LTEANU
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/12005">Feature #12005</a>: Mightful workflow field enhancement: hide</i> added</li></ul> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=897082019-02-02T02:38:58ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/11963">Feature #11963</a>: Hide the estimated times on issues for certain roles</i> added</li></ul> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=897222019-02-02T07:19:55ZBernhard Rohloff
<ul></ul><p>+1 It would be great to have estimated times integrated in the allover times permissions system.</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=911172019-04-05T14:20:15ZThierry Brochu
<ul></ul><p>+1</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=913502019-04-26T06:13:02ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/22879">add_permission_view_estimated_hours.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22879/add_permission_view_estimated_hours.png">add_permission_view_estimated_hours.png</a> added</li><li><strong>File</strong> <a href="/attachments/22880">3088.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22880/3088.patch">3088.patch</a> added</li></ul><p>Add "View estimated hours" permission to the "Roles and permissions".</p>
<p><img src="https://www.redmine.org/attachments/download/22879/add_permission_view_estimated_hours.png" style="width:50%;border:1px solid #ccc;" alt="" /></p>
<p>If the project has the "Time tracking" module enabled and the role has "View estimated time" permission enabled, the "Estimated hours" field is available.<br />I attached a patch.</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=933682019-08-28T14:29:03ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=958632020-01-26T04:45:09ZGo MAEDA
<ul></ul><p>Now the patch cannot be applied cleanly.</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=959682020-01-30T01:46:49ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/24723">3088-v2.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/24723/3088-v2.patch">3088-v2.patch</a> added</li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Now the patch cannot be applied cleanly.</p>
</blockquote>
<p>Fixed the patch to work on the current trunk(<a class="changeset" title="Fix 'DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison i..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/19478">r19478</a>).</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=976002020-04-30T13:08:50ZGo MAEDA
<ul></ul><p>Yuichi HARADA wrote:</p>
<blockquote>
<p>Fixed the patch to work on the current trunk(<a class="changeset" title="Fix 'DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison i..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/19478">r19478</a>).</p>
</blockquote>
<p>Thank you for the patch. But I am hesitant to make this patch a candidate for 4.2.0. This is because existing users who can currently see estimated hours will lose access to it after applying the patch because view_estimated_hours will not be granted to no roles by default.</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=1059192022-03-16T03:00:52ZGo MAEDA
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Yuichi HARADA wrote:</p>
<blockquote>
<p>Fixed the patch to work on the current trunk(<a class="changeset" title="Fix 'DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison i..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/19478">r19478</a>).</p>
</blockquote>
<p>Thank you for the patch. But I am hesitant to make this patch a candidate for 4.2.0. This is because existing users who can currently see estimated hours will lose access to it after applying the patch because view_estimated_hours will not be granted to no roles by default.</p>
</blockquote>
<p>Adding a migration like the following will resolve the above problem.</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/db/migrate/20220315101502_add_view_estimated_hours_to_all_existing_roles.rb b/db/migrate/20220315101502_add_view_estimated_hours_to_all_existing_roles.rb
</span><span class="p">new file mode 100644
</span><span class="gh">index 000000000..ed2ad47de
</span><span class="gd">--- /dev/null
</span><span class="gi">+++ b/db/migrate/20220315101502_add_view_estimated_hours_to_all_existing_roles.rb
</span><span class="p">@@ -0,0 +1,9 @@</span>
<span class="gi">+class AddViewEstimatedHoursToAllExistingRoles < ActiveRecord::Migration[6.1]
+ def up
+ Role.all.each { |role| role.add_permission! :view_estimated_hours }
+ end
+
+ def down
+ # nothing to revert
+ end
+end
</span></code></pre> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=1070672022-06-24T01:30:24ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>5.1.0</i></li></ul> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=1073692022-07-20T06:24:49ZVictor C
<ul></ul><p>Hi,<br />I've ported the patch to version 5.0.2, in case there is someone who needs it.</p>
<p>github.com/dotruby/redmine/pull/1</p>
<p>Thanks Yuichi HARADA for the patch!</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=1073822022-07-20T11:10:41ZVictor C
<ul><li><strong>File</strong> <a href="/attachments/29476">3088-v2_5.0.2.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/29476/3088-v2_5.0.2.patch">3088-v2_5.0.2.patch</a> added</li></ul> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=1074882022-07-31T12:36:56ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/29526">3088-v3.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/29526/3088-v3.diff">3088-v3.diff</a> added</li></ul><p>The patch still needs to be added some code. Even after revoking the privilege from a user, the update history of the estimated hours field is exposed via issue journal.</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=1074952022-08-01T04:41:20ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/29527">3088-v4.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/29527/3088-v4.patch">3088-v4.patch</a> added</li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>The patch still needs to be added some code. Even after revoking the privilege from a user, the update history of the estimated hours field is exposed via issue journal.</p>
</blockquote>
<p>It will be improved in the following patch.</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/models/journal.rb b/app/models/journal.rb
index 919a07dd2e..16a9699be4 100644
</span><span class="gd">--- a/app/models/journal.rb
</span><span class="gi">+++ b/app/models/journal.rb
</span><span class="p">@@ -111,6 +111,8 @@</span> class Journal < ActiveRecord::Base
detail.custom_field && detail.custom_field.visible_by?(project, user)
elsif detail.property == 'relation'
Issue.find_by_id(detail.value || detail.old_value).try(:visible?, user)
<span class="gi">+ elsif detail.property == 'attr' && detail.prop_key == 'estimated_hours'
+ user.allowed_to?(:view_estimated_hours, project)
</span> else
true
end
</code></pre> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=1085392022-11-14T16:39:37ZMartin Mayr-gebhard
<ul></ul><p>+1</p> Redmine - Feature #3088: Estimated hours field able to hide role basedhttps://www.redmine.org/issues/3088?journal_id=1109852023-10-15T04:59:21ZMischa The Evil
<ul><li><strong>Target version</strong> changed from <i>5.1.0</i> to <i>Candidate for next major release</i></li></ul>While I understand the rationale behind this issue, I'd oppose to the solution proposed in the provided patches. The implementation seems problematic for several reasons, of which some are:
<ul>
<li>this solution only covers the visibility of one specific issue attribute, while there already is a need for a more general solution covering more/other/all attributes;</li>
<li>this solution mixes <code>:time_tracking</code> module permissions for <code>:issue_tracking</code> object attribute visibility;</li>
<li>this solution seems to make the activation of the <code>:time_tracking</code> module mandatory to be able to see the estimated time in issues, making it impossible to just use the <code>:issue_tracking</code> module.</li>
</ul>
<p>Given the above and the current status of <a class="version" href="https://www.redmine.org/versions/176">5.1.0</a>, I'd say it's best to postpone this issue to a later version for now.</p>