Change fields position in a Redmine issue page

There is no setting in Redmine to change standard fields position or to include a custom field between standard fields. However you can achieve this with the following tweak.

First you have to install the View customize plugin.

Let's illustrate this by means of a couple of examples.

Example 1: we want custom field “User Dept.” to be shown right after the tracker field

  • go to Administration > Custom fields and get the custom field ID for “User Dept.”. To get it, just hover over the custom field name and you will see such a URL: http://youredmine.com/custom_fields/4/edit. Custom field ID in our example will be “4”
  • create a new view in the View customize plugin. This is the snippet:

Copy/paste the code from here:

	
$(function() {
  var customField = $('p:has(#issue_custom_field_values_4)');
  $('p:has(#issue_tracker_id)')
    .after(
      $('<div class="splitcontent">')
        .append(
          $('<div class="splitcontentleft">').append(customField)));
})

This is the result:

Example 2: we want custom field “User Dept.” to be shown right after the description field

Copy/paste the code from here:

$(function() {
  var customField = $('p:has(#issue_custom_field_values_4)');
  $('p:has(#issue_description)')
    .after(
      $('<div class="splitcontent">')
        .append(
          $('<div class="splitcontentleft">').append(customField)));
})

This is the result:

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *