diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 26e9b04..71e4394 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -28,6 +28,8 @@ class CustomFieldsController < ApplicationController respond_to do |format| format.html { @custom_fields_by_type = CustomField.all.group_by {|f| f.class.name } + @custom_fields_projects_count = + IssueCustomField.where(is_for_all: false).joins(:projects).group(:custom_field_id).count } format.api { @custom_fields = CustomField.all diff --git a/app/views/custom_fields/_index.html.erb b/app/views/custom_fields/_index.html.erb index 7a5d372..0a5ff3e 100644 --- a/app/views/custom_fields/_index.html.erb +++ b/app/views/custom_fields/_index.html.erb @@ -18,7 +18,7 @@