プロジェクト

全般

プロフィール

Vote #66789

完了

Role-based issue custom field visibility

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues permissions_23
対象バージョン:
開始日:
2010/03/10
期日:
進捗率:

0%

予定工数:
category_id:
23
version_id:
70
issue_org_id:
5037
author_id:
5871
assigned_to_id:
1
comments:
40
status_id:
5
tracker_id:
2
plus1:
8
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

It would be nice to define some kind of view permission for fields in issues. For example, when you define a new custom field you should define also wich role can view this field.
The implementation of #337 should open the way for implementing this feature too.


journals

--------------------------------------------------------------------------------
+1 For role based custom fields. This is important, because there is information we as developers don't want to share with everybody else. For example organization heads are not interested in seeing information about technical aspect of the issue?
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
particial dupe of, covered by #8050
--------------------------------------------------------------------------------
+1

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
related (dupe) of Mightful workflow field enhancement: hide #12005
--------------------------------------------------------------------------------
Well I'm closing this, even if #12005 isn't implemented now. But #12005 will resolve exact this request after implementation!
Anyway it's kind of duplicate, even if it was an earlier entry than #12005.
--------------------------------------------------------------------------------
+1 on this, would be a nice improvement, and not overly complex.
--------------------------------------------------------------------------------
Should not be restricted to "custom fields" of course, but to all fields of an issue.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1

Being able to "hide" certain fields (including not custom fields) for certain roles would be much appreciated.

Also mail updates, reports (pdf) and feeds should not carry hidden fields for the roles for which they have been hidden.
--------------------------------------------------------------------------------
++++1 for planning this feature for next version. Great!!!
--------------------------------------------------------------------------------
David Robinson wrote:

> Being able to "hide" certain fields (including not custom fields) for certain roles would be much appreciated.

Well, this feature planned for 2.4.0 is about *custom fields* only. Being able to hide some standard fields would be a bit trickier and might be added later, sorry.
--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
> David Robinson wrote:
>
> > Being able to "hide" certain fields (including not custom fields) for certain roles would be much appreciated.
>
> Well, this feature planned for 2.4.0 is about *custom fields* only. Being able to hide some standard fields would be a bit trickier and might be added later, sorry.

OK, Should I create a new feature request for it then?

--------------------------------------------------------------------------------
David Robinson wrote:

> OK, Should I create a new feature request for it then?

Sure, and thanks for the feedback!
--------------------------------------------------------------------------------
Here are some details about the possible implementation of custom fields visibility:
* update the issue custom field form in order to select roles that can see the field
* update the issue view (HTML, PDF, API) to hide hidden custom fields, including in the issue history (custom fields changes)
* update the issue form to exclude hidden custom fields
* completely exclude custom fields from the issue list (columns/filters) if they are not visible by the user on any projects
* update the issue list (HTML, PDF, CSV, API) to hide hidden custom fields values per row (on the cross-project list, the user might be able to see custom fields for some projects but not for some other projects, depending on his roles on these projects)
* when filtering or grouping the issue list by a custom field, exclude issues for which the custom is not visible
* same thing for the time entries list (where issue custom fields can be displayed/filtered)
* update the search engine so that it doesn't look up in searchable custom fields that are not visible
* update the email notification system so that each user receives an email with only visible custom field (need to change message-ids since multiple emails might now be sent for the same event)
* when updating an issue by just changing custom fields values, don't notify users that can't see these custom fields

Please let me know if I'm missing something.
--------------------------------------------------------------------------------
Jean-Philippe: maybe also consider Custom Queries:

* don't offer the custom fields that are hidden in "custom queries" (queries/new) "Add filter" option
* hide Custom Queries which include filtering by some custom field which is hidden

I wonder if it isn't worth to also consider the "regular fields" at the same time, because you will have to touch all those different areas anyway. Or at least prepare an API for it, to make it easier to later hide "regular fields" (maybe someone could then write a plugin to do so).

From the regular fields there are some "special ones" which shouldn't be hideable, i.e. "Status", "Tracker", "Parent Task" and "Subject".
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1
It will be very useful *feature*! Look forward to!
Jean-Philippe Lang You're doing a great job, thank you!
--------------------------------------------------------------------------------
Feature added in r12013. You can now limit the visibility issue custom field to certain roles.

Ernesto Baschny wrote:
> * don't offer the custom fields that are hidden in "custom queries" (queries/new) "Add filter" option

Done

> * hide Custom Queries which include filtering by some custom field which is hidden

That would involve too much logic for filtering custom queries. Instead, custom queries can now be made visible to certain roles only (#1019 added for 2.4.0). A user that would be able to display a custom query with fields that are not visible to him wouldn't see them anyway. Queries always take care to show visibile fields only.
--------------------------------------------------------------------------------
This is great Jean! Tx for this.

--------------------------------------------------------------------------------
Thanks Jean!

The correct revision where this was added is r12012.

Still feature #12005 (having the same feature available for standard fields as well) is still very much desired. :)
--------------------------------------------------------------------------------
500 when trying to add a spent time custom field to spent time report:

<pre>
ActionView::Template::Error (undefined method `visible_by?' for #<TimeEntryCustomField:0x3e7bb50>):
19: <tbody>
20: <% entries.each do |entry| -%>
21: <tr class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
22: <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
23: <%= raw @query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, entry)}</td>"}.join %>
24: <td align="center">
25: <% if entry.editable_by?(User.current) -%>
app/models/query.rb:84:in `value'
app/helpers/queries_helper.rb:84:in `column_content'
app/views/timelog/_list.html.erb:22:in `block (3 levels) in _app_views_timelog__list_html_erb__1016642981_38612940'
app/views/timelog/_list.html.erb:22:in `map'
app/views/timelog/_list.html.erb:22:in `block (2 levels) in _app_views_timelog__list_html_erb__1016642981_38612940'
app/views/timelog/_list.html.erb:19:in `each'
app/views/timelog/_list.html.erb:19:in `block in _app_views_timelog__list_html_erb__1016642981_38612940'
app/views/timelog/_list.html.erb:1:in `_app_views_timelog__list_html_erb__1016642981_38612940'
app/views/timelog/index.html.erb:20:in `_app_views_timelog_index_html_erb___932575742_45051756'
app/controllers/timelog_controller.rb:64:in `block (2 levels) in index'
app/controllers/timelog_controller.rb:51:in `index'
</pre>

@CustomField#visible_by?@ seems to be implemented in @IssueCustomField@ only, did you mean to implement a default one in @CustomField@?

--------------------------------------------------------------------------------
Etienne Massip wrote:

> @CustomField#visible_by?@ seems to be implemented in @IssueCustomField@ only, did you mean to implement a default one in @CustomField@?

Thanks for pointing this out, it's fixed in r12041.
--------------------------------------------------------------------------------
Thanks for this feature. When can we expect this in a stable release?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Hello, is it possible to add this feature to release 2.3.4, as it would be very very nice for our redmine installations.

Best regards,

Sebastian
--------------------------------------------------------------------------------
+1

Sebastian Spill wrote:
> Hello, is it possible to add this feature to release 2.3.4, as it would be very very nice for our redmine installations.
>
> Best regards,
>
> Sebastian

--------------------------------------------------------------------------------
dude, read the ticket! It's planned for the next version 2.4.0!
2.3.x releases only contain bugfixes and never any new features...
--------------------------------------------------------------------------------
Hello,

thanks a lot for quick release! I found a bug regarding this new feature:

When you add custom fields with option "required", the role-based feature does not work correctly. The fields are not displayed, but the validation routine makes the ticket unsaveable.

Regards,

Sebastian
--------------------------------------------------------------------------------
Sebastian Spill wrote:

> When you add custom fields with option "required", the role-based feature does not work correctly. The fields are not displayed, but the validation routine makes the ticket unsaveable.

Please, open a bug report.

--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
> Sebastian Spill wrote:
>
> > When you add custom fields with option "required", the role-based feature does not work correctly. The fields are not displayed, but the validation routine makes the ticket unsaveable.
>
> Please, open a bug report.

FTR: #15408
--------------------------------------------------------------------------------
Hi there,

is there a chance to have the feature also for non-issue related custom fields, like "Spent time"? Would be very useful.

Thanks,
Stefan

--------------------------------------------------------------------------------
-Hi I cannot see any visibility controls. See attached file.-
Sorry looked in wrong place..
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,5011,Limit Visible Issue Fields Based on Permissions
relates,New,12005,Mightful workflow field enhancement: hide
relates,Closed,14162,Hidden Fields - Role Based
relates,Closed,17096,Issue emails cannot be threaded by some mailers due to inconsistent Message-ID and References field
relates,Closed,23997,Per role visibility settings for version custom fields
relates,Closed,29160,Remove unused and broken method CustomField.visibility_condition
duplicates,Closed,8162,Issue custom field visibility per workflow
duplicates,Closed,3976,Hide custom fields from certain roles

Admin Redmine さんが3年以上前に更新

  • カテゴリIssues permissions_23 にセット
  • 対象バージョン2.4.0_70 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0