Vote #64989
未完了Estimated hours field able to hide role based
0%
journals
I've got something like this hacked onto my site right now that I can extract and cleanup a bit.
--------------------------------------------------------------------------------
any news?
--------------------------------------------------------------------------------
+1 It would be very good to get this, as we have to hide our estimations from some roles :(
--------------------------------------------------------------------------------
+1 on this one!
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
is covered by #8050
--------------------------------------------------------------------------------
made a plugin for this: http://www.redmine.org/plugins/redmine_hide_estimated_hours
--------------------------------------------------------------------------------
does anybody have version 1.0.0 of this plugin?
--------------------------------------------------------------------------------
Assigned issue with no assignee back to New status.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
+1 It would be great to have estimated times integrated in the allover times permissions system.
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Add "View estimated hours" permission to the "Roles and permissions".
!{width:50%;border:1px solid #ccc;}add_permission_view_estimated_hours.png!
If the project has the "Time tracking" module enabled and the role has "View estimated time" permission enabled, the "Estimated hours" field is available.
I attached a patch.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Now the patch cannot be applied cleanly.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Now the patch cannot be applied cleanly.
Fixed the patch to work on the current trunk(r19478).
--------------------------------------------------------------------------------
Yuichi HARADA wrote:
> Fixed the patch to work on the current trunk(r19478).
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.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Yuichi HARADA wrote:
> > Fixed the patch to work on the current trunk(r19478).
>
> 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.
Adding a migration like the following will resolve the above problem.
<pre><code class="diff">
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
new file mode 100644
index 000000000..ed2ad47de
--- /dev/null
+++ b/db/migrate/20220315101502_add_view_estimated_hours_to_all_existing_roles.rb
@@ -0,0 +1,9 @@
+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
</code></pre>
--------------------------------------------------------------------------------
related_issues
relates,Closed,3976,Hide custom fields from certain roles
relates,New,12005,Mightful workflow field enhancement: hide
duplicates,Closed,3781,Add permission to control viewing of Estimated Hours based on Role
duplicates,Closed,15107,Add a permission option to view estimated hours
duplicates,Closed,11963,Hide the estimated times on issues for certain roles
Admin Redmine さんがほぼ4年前に更新
- カテゴリ を Permissions and roles_17 にセット
- 対象バージョン を Candidate for next major release_32 にセット