I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Extended Fields plugin for Redmine/ChiliProject

The Extended Fields plugin for Redmine and ChiliProject extends custom fields by adding new properties, new custom field types and by allowing to customize views (rendering) of custom field values.

This plugin can also be used as a “framework” for creating other plugins (like it is used by the Extended Profile plugin).

The Extended Fields plugin extends Redmine/ChiliProject by adding:

New properties

This plugin adds new properties (into the custom field creation/edition form):

Hint

Editing hint

This plugin adds the “Hint” property value of which is displayed below the custom field input element in a form.

Displaying hint

On registration

On registration flag

To let users control the registration form this plugin adds new user custom field property “On registration”. If this property is disabled the custom field won’t be shown in the registration form.

Please be sure not to require custom fields which were disabled for registration!

New custom field types

This plugin also adds the following new custom field types:

Wiki text

Not available in Redmine 2.5.x, which comes with Wiki formatting support for “Long text” custom fields.

Redmine and ChiliProject have built-in custom field type “text” (more known as “Long text”) but this type does not support Wiki formatting. This plugin provides a solution by adding new type “Wiki text”.

Link

Redmine 2.5.x comes with built-in “Link” type.

This plugin adds new type “Link” which supports HTTP URLs and renders them as links.

The similar type named “URL” is provided by the URL custom field plugin of Eric Davis.

Custom field of project type

Project

With this plugin you can now create a custom field allowing to select a project from the projects list. The value of such custom field is rendered as a link to project.

Templates for custom fields

But the most interesting feature of this plugin, perhaps, is support for custom field templates. With a template you can extend any custom field of any type (by the way, this is how the “Project” type is rendered)! For example, you can make integer contain the percentage sign or boolean be shown as a checkbox...

So let’s review how this can be done:

Templates by type

To create a template for custom fields of some type create an eRuby file _<type>.html.erb in the app/views/custom_values/common directory. For example, file app/views/custom_values/common/_bool.html.erb will specify view for boolean custom fields.

Check also this page for details and sample.

Templates by custom field name

It is also possible to specify a template for a custom field with a particular name. Saying you have a custom field named “Very special custom field” of type string. To create a template for this field create an eRuby file _very_special_custom_field.html.erb in the string subdirectory of the app/views/custom_values directory.

Check also this page for details and sample.

Configurable columns for listings

The plugin also adds possibility to specify, which columns should be shown in listings and adds new columns.

Projects listing (in “Administration”)

The projects listing in the “Administration” section now supports columns customization. Besides main attributes of projects the plugin also adds custom fields, issues counts by tracker, status and priority, project modules statuses and other special columns.

Customized columns in projects listing

Users listing (in “Administration”)

The users listing in the “Administration” section now supports columns customization. Besides main attributes of users the plugin also adds custom fields and special columns.

Customized columns in users listing

Issues listings

New columns in issues listing

Some special columns were also added to the issue listing.

Install

To install this plugin do:

  • For Redmine 2.x.x and above:
    • Copy extended_fields directory to #{RAILS_ROOT}/plugins.
    • Run: rake redmine:plugins:migrate RAILS_ENV=production.
  • For older Redmine and ChiliProject:
    • Copy extended_fields directory to #{RAILS_ROOT}/vendor/plugins.
    • Run: rake db:migrate:plugins RAILS_ENV=production.
  • Restart Redmine/ChiliProject.

Upgrade

As Redmine 2.5 comes with support of Wiki formatting for the “Long text” type, the version 0.2.3 of Extended Fields plugin drops the “Wiki” custom field type in favor of “Long text”, but only if it’s run under Redmine 2.5! I.e, when Extended Fields 0.2.3 is run under Redmine 2.4 or below the “Wiki” type will be still available.

So, Extended Fields 0.2.3 comes with the special script to migrate “Wiki” custom fields to the “Long text” type, when it’s run under Redmine 2.5 or above. But, it changes nothing under Redmine 2.4 or below! Yet still Redmine remembers, that the migration script has been run, and therefore won’t run it, when you upgrade to Redmine 2.5!

So, if you have upgraded Extended Fields to 0.2.3 under Redmine 2.4 or below, when upgrading Redmine to 2.5 or above you need to:

  • Rename db/migrate/004_migrate_wiki_custom_fields.rb to db/migrate/999_migrate_wiki_custom_fields.rb.
    (or any other large number instead of 999)
  • Run the migration: rake redmine:plugins:migrate RAILS_ENV=production

hint-edit.png View - Editing hint (5.16 KB) Andriy Lesyuk, 12 Dec 2011 12:06

hint-shown.png View - Displaying hint (7.72 KB) Andriy Lesyuk, 12 Dec 2011 12:06

on-registration.png View - On registration flag (2.27 KB) Andriy Lesyuk, 12 Dec 2011 12:23

project.png View - Custom field of project type (60.8 KB) Andriy Lesyuk, 12 Dec 2011 12:23

projects.png View - Customized columns in projects listing (59 KB) Andriy Lesyuk, 17 Mar 2012 11:38

users.png View - Customized columns in users listing (57.8 KB) Andriy Lesyuk, 17 Mar 2012 11:38

issues.png View - New columns in issues listing (7.55 KB) Andriy Lesyuk, 17 Mar 2012 11:38

calendar-date.png View - Issue, project and version date custom fields on the calendar (6.61 KB) Andriy Lesyuk, 12 Sep 2013 15:00

Terms of use | Privacy policy