Feature #3088
openEstimated hours field able to hide role based
Added by Tim Klein over 15 years ago. Updated about 2 months ago.
0%
Description
adding the option to hide this field to the "roles and permissions" manager
Files
add_permission_view_estimated_hours.png (50.4 KB) add_permission_view_estimated_hours.png | Yuichi HARADA, 2019-04-26 08:08 | ||
3088.patch (24.7 KB) 3088.patch | Yuichi HARADA, 2019-04-26 08:10 | ||
3088-v2.patch (23.6 KB) 3088-v2.patch | Yuichi HARADA, 2020-01-30 02:44 | ||
3088-v2_5.0.2.patch (25 KB) 3088-v2_5.0.2.patch | Victor C, 2022-07-20 13:10 | ||
3088-v3.diff (23.5 KB) 3088-v3.diff | Go MAEDA, 2022-07-31 14:31 | ||
3088-v4.patch (25.4 KB) 3088-v4.patch | Yuichi HARADA, 2022-08-01 06:40 |
Related issues
Updated by Eric Davis over 15 years ago
- Status changed from New to 7
- Assignee set to Eric Davis
- Estimated time deleted (
0.50 h)
I've got something like this hacked onto my site right now that I can extract and cleanup a bit.
Updated by Anton Nepomnyaschih over 13 years ago
+1 It would be very good to get this, as we have to hide our estimations from some roles :(
Updated by Dominique Lederer almost 13 years ago
made a plugin for this: http://www.redmine.org/plugins/redmine_hide_estimated_hours
Updated by Pavel Bahushevich almost 12 years ago
does anybody have version 1.0.0 of this plugin?
Updated by Jean-Philippe Lang almost 12 years ago
- Status changed from 7 to New
Assigned issue with no assignee back to New status.
Updated by Go MAEDA almost 6 years ago
- Has duplicate Feature #3781: Add permission to control viewing of Estimated Hours based on Role added
Updated by Go MAEDA almost 6 years ago
- Has duplicate Feature #15107: Add a permission option to view estimated hours added
Updated by Marius BÄ‚LTEANU almost 6 years ago
- Related to Feature #12005: Mightful workflow field enhancement: hide added
Updated by Go MAEDA almost 6 years ago
- Has duplicate Feature #11963: Hide the estimated times on issues for certain roles added
Updated by Bernhard Rohloff almost 6 years ago
+1 It would be great to have estimated times integrated in the allover times permissions system.
Updated by Yuichi HARADA over 5 years ago
- File add_permission_view_estimated_hours.png add_permission_view_estimated_hours.png added
- File 3088.patch 3088.patch added
Add "View estimated hours" permission to the "Roles and permissions".
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.
Updated by Go MAEDA about 5 years ago
- Target version set to Candidate for next major release
Updated by Go MAEDA almost 5 years ago
Now the patch cannot be applied cleanly.
Updated by Yuichi HARADA almost 5 years ago
- File 3088-v2.patch 3088-v2.patch added
Go MAEDA wrote:
Now the patch cannot be applied cleanly.
Fixed the patch to work on the current trunk(r19478).
Updated by Go MAEDA over 4 years ago
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.
Updated by Go MAEDA over 2 years ago
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.
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
Updated by Go MAEDA over 2 years ago
- Target version changed from Candidate for next major release to 5.1.0
Updated by Victor C over 2 years ago
Hi,
I've ported the patch to version 5.0.2, in case there is someone who needs it.
github.com/dotruby/redmine/pull/1
Thanks Yuichi HARADA for the patch!
Updated by Victor C over 2 years ago
- File 3088-v2_5.0.2.patch 3088-v2_5.0.2.patch added
Updated by Go MAEDA over 2 years ago
- File 3088-v3.diff 3088-v3.diff added
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.
Updated by Yuichi HARADA over 2 years ago
- File 3088-v4.patch 3088-v4.patch added
Go MAEDA wrote:
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.
It will be improved in the following patch.
diff --git a/app/models/journal.rb b/app/models/journal.rb
index 919a07dd2e..16a9699be4 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -111,6 +111,8 @@ 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)
+ elsif detail.property == 'attr' && detail.prop_key == 'estimated_hours'
+ user.allowed_to?(:view_estimated_hours, project)
else
true
end
Updated by Mischa The Evil about 1 year ago
- Target version changed from 5.1.0 to Candidate for next major release
- 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;
- this solution mixes
:time_tracking
module permissions for:issue_tracking
object attribute visibility; - this solution seems to make the activation of the
:time_tracking
module mandatory to be able to see the estimated time in issues, making it impossible to just use the:issue_tracking
module.
Given the above and the current status of 5.1.0, I'd say it's best to postpone this issue to a later version for now.
Updated by Stefaan Ellebaut about 2 months ago
Any news on when this actually will get into a release?