Patch #32548

Add new hook in projects/settings/_issues.html.erb for custom fields

Added by Jérôme BATAILLE over 1 year ago. Updated over 1 year ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Hook requests
Target version:-

Description

This would be very helpful to add new features from plugins related to custom fields.

Thanks a lot to take in accout this very small patch

  <% unless @issue_custom_fields.empty? %>
  <fieldset class="box tabular" id="project_issue_custom_fields"><legend><%= toggle_checkboxes_link('#project_issue_custom_fields input[type=checkbox]:enabled') %><%=l(:label_custom_field_plural)%></legend>
  <% @issue_custom_fields.each do |custom_field| %>
    <label class="floating">
      <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
          :disabled => (custom_field.is_for_all? ? "disabled" : nil),
          :id => nil %>
      <%= custom_field_name_tag(custom_field) %>
    </label>
  <% end %>
  <%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
  </fieldset>

<%
  # The new hook
-%>
<%= call_hook(:view_project_settings_issues_custom_fields, { :issue_custom_fields => @issue_custom_fields, :project => @project }) %>
  <% end %>

History

#1 Updated by Jérôme BATAILLE over 1 year ago

This description can be edited to change the pre code class to ruby, thanks.

#2 Updated by Bernhard Rohloff over 1 year ago

  • Description updated (diff)

#3 Updated by Go MAEDA over 1 year ago

  • Category changed from Project settings to Hook requests

Also available in: Atom PDF