Project

General

Profile

Actions

Feature #5037

closed

Role-based issue custom field visibility

Added by Dario Laera about 14 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues permissions
Target version:
Start date:
2010-03-10
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

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.


Files

2014-07-17 09_13_13-Workflow.png (15.9 KB) 2014-07-17 09_13_13-Workflow.png Juozapis Juozapauskiksi, 2014-07-17 08:21

Related issues

Related to Redmine - Feature #5011: Limit Visible Issue Fields Based on PermissionsClosed2010-03-08

Actions
Related to Redmine - Feature #12005: Mightful workflow field enhancement: hideNew

Actions
Related to Redmine - Feature #14162: Hidden Fields - Role BasedClosed

Actions
Related to Redmine - Defect #17096: Issue emails cannot be threaded by some mailers due to inconsistent Message-ID and References fieldClosedGo MAEDA

Actions
Related to Redmine - Feature #23997: Per role visibility settings for version custom fieldsClosedGo MAEDA

Actions
Related to Redmine - Patch #29160: Remove unused and broken method CustomField.visibility_conditionClosedJean-Philippe Lang

Actions
Has duplicate Redmine - Feature #8162: Issue custom field visibility per workflowClosed2011-04-15

Actions
Has duplicate Redmine - Feature #3976: Hide custom fields from certain rolesClosed2009-10-06

Actions
Actions #1

Updated by Jean-Philippe Lang about 14 years ago

  • Subject changed from Role-based field visibility to Role-based custom field visibility
Actions #2

Updated by Gints Murāns almost 14 years ago

+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?

Actions #3

Updated by pasquale [:dedalus] almost 13 years ago

+1

Actions #4

Updated by Terence Mill almost 13 years ago

particial dupe of, covered by #8050

Actions #5

Updated by Panagiotis Korros over 12 years ago

+1

Actions #6

Updated by Moni Ghaoui over 11 years ago

+1

Actions #7

Updated by Terence Mill over 11 years ago

related (dupe) of Mightful workflow field enhancement: hide #12005

Actions #8

Updated by Daniel Felix about 11 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

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.

Actions #9

Updated by Ernesto Baschny almost 11 years ago

+1 on this, would be a nice improvement, and not overly complex.

Actions #10

Updated by Ernesto Baschny almost 11 years ago

Should not be restricted to "custom fields" of course, but to all fields of an issue.

Actions #11

Updated by Jean-Philippe Lang almost 11 years ago

  • Status changed from Closed to New
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.4.0
Actions #12

Updated by David Robinson almost 11 years ago

+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.

Actions #13

Updated by VD DV almost 11 years ago

++++1 for planning this feature for next version. Great!!!

Actions #14

Updated by Jean-Philippe Lang almost 11 years ago

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.

Actions #15

Updated by David Robinson almost 11 years ago

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?

Actions #16

Updated by Jean-Philippe Lang almost 11 years ago

David Robinson wrote:

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

Sure, and thanks for the feedback!

Actions #17

Updated by Jean-Philippe Lang almost 11 years ago

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.

Actions #18

Updated by Ernesto Baschny almost 11 years ago

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".

Actions #19

Updated by Toshi MARUYAMA almost 11 years ago

  • Resolution deleted (Duplicate)
Actions #20

Updated by Александр Александрук over 10 years ago

+1
It will be very useful feature! Look forward to!
Jean-Philippe Lang You're doing a great job, thank you!

Actions #21

Updated by Jean-Philippe Lang over 10 years ago

  • Subject changed from Role-based custom field visibility to Role-based issue custom field visibility
  • Status changed from New to Closed
  • Resolution set to Fixed

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.

Actions #22

Updated by Terence Mill over 10 years ago

This is great Jean! Tx for this.

Actions #23

Updated by Ernesto Baschny over 10 years ago

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. :)

Actions #24

Updated by Etienne Massip over 10 years ago

  • Status changed from Closed to Reopened

500 when trying to add a spent time custom field to spent time report:

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'

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

Actions #25

Updated by Jean-Philippe Lang over 10 years ago

  • Status changed from Reopened to Closed

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.

Actions #26

Updated by Vimal Joseph over 10 years ago

Thanks for this feature. When can we expect this in a stable release?

Actions #27

Updated by Toshi MARUYAMA over 10 years ago

  • Related to Feature #3976: Hide custom fields from certain roles added
Actions #28

Updated by Toshi MARUYAMA over 10 years ago

  • Related to deleted (Feature #3976: Hide custom fields from certain roles)
Actions #29

Updated by Toshi MARUYAMA over 10 years ago

  • Has duplicate Feature #3976: Hide custom fields from certain roles added
Actions #30

Updated by Sebastian Sp over 10 years ago

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

Actions #31

Updated by Christoph Klesser over 10 years ago

+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

Actions #32

Updated by Tobias Fischer over 10 years ago

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...

Actions #33

Updated by Sebastian Sp over 10 years ago

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

Actions #34

Updated by Jean-Philippe Lang over 10 years ago

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.

Actions #35

Updated by Toshi MARUYAMA over 10 years ago

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

Actions #36

Updated by Stefan T. Oertel about 10 years ago

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

Actions #37

Updated by Juozapis Juozapauskiksi over 9 years ago

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

Actions #38

Updated by Toshi MARUYAMA almost 9 years ago

  • Related to Defect #17096: Issue emails cannot be threaded by some mailers due to inconsistent Message-ID and References field added
Actions #39

Updated by Toshi MARUYAMA over 7 years ago

  • Related to Feature #23997: Per role visibility settings for version custom fields added
Actions #40

Updated by Go MAEDA over 5 years ago

  • Related to Patch #29160: Remove unused and broken method CustomField.visibility_condition added
Actions

Also available in: Atom PDF