Redmine Computed Custom Field

Make you Redmine even more useful with a feature that allows you to configure custom fields with mathematical formula that is calculated each time you make an upadate to customized object.

Pic1614550164.png

You can use Computed Custom Field plugin alongside our other plugin Project Specific Custom Field to get even more powerful effect.

Try our free Demo

Buy now*

*includes one-year of updates


Description

This plugin allows you to create a computed custom field. The value of the computed field can be set by formula and dynamically calculated on object update. You can use other custom fields in your formula by choosing them for the list of available custom fields.

Pic1614550164.png

A valid formula is a valid Ruby code executed when a customized object is updated. To put a field name in the formula, double-click on an item in the list of available fields. Please notice that if you change existing formula, you need to update ALL the impacted objects to make a new formula work (e.g. you can bulk edit issues by adding a proper comment like “CF formula update”)

Examples

cfs[1]*2+cfs[2]
# means
# custom_field_value(1) * 2 + custom_field_value(2)

(cfs[1]/3.14).round(2)

if cfs[1].zero?
 cfs[2]/2
else
 cfs[3]/2
end

# For IssueCustomField
(self.estimated_hours || 0) * 2

# For ProjectCustomField
self.parent_id == 2

# If format of Custom Field is Link
"/projects/#{self.project_id.to_s}/issues/new?issue[subject]=Review+request+[##{self.id.to_s} #{self.subject}]&issue[tracker_id]=3"

# Retrieve a value from Key/value list custom field
cfs[1].try(:id)

Support for writing formulas

Please understand that due the nature, complexity of the plugin and budget constraints we are not able and won’t support any issues and questions regarding writing of formulas.

For the help and reference please find the following resources:

Original plugin FAQ

Original plugin Questions

Issue class doc

Project class doc

User class doc

TimeEntry class doc

Version class doc

Group class doc

Document class doc

Enumeration class doc

Try our free Demo

Buy now*

*includes one-year of updates


Setup instructions

Please ALWAYS make preliminary installation and tests of the plugin on development environment before proceeding to setup on production server.

It is possible that by making some changes in formulas (like deleting objects referenced in them) you can crash your system. So it is a paramount to have a full backup of the system before making any changes and keep the regular backups afterwards as per best practices. You have been warned 😃

We do recommend that you start with some basic formulas in the beginning and then proceed with advanced one after research.

1. Credits

Redmine Computed Field is based on annikoff’ splendid work which was released to the community. Unfortunetly, project seems to be abandoned. We really liked it and decided to support it and make it better with even more features (like improving UX, adding more validations and project specific custom field functionality).

2. Installation

Before processing it is recommended to backup your Redmine instance, both files and database (!)

Follow Redmine standard plugin installation steps:

  1. Upload redmine_computed_custom_field/ directory to plugins/ inside Redmine root directory.
  2. From shell, still inside Redmine directory, run rake redmine:plugins:migrate
  3. Restart Redmine instance.
  4. Open Redmine inside your browser.

That’s it! Please refer to description for further use of the plugin.

This plugin should be compatible with original annikoff plugin latest version (1.0.7) Changes and improvements were made with backward compatibility in mind.

Try our free Demo

Buy now*

*includes one-year of updates


Changelog

2.0.1 01-02-2020
[Fix] Error migrating from older version with different plugin name

2.0.0 2-12-2020
[Feature] Compatible with Redmine 3.4 and 4.1

1.1.5 28-08-2020
[Fix] Recalculating formula exception

1.1.4 17-08-2020
[Fix] Global custom fields are now visible when creating formulas for project custom fields
[Fix] Using fields with space in name resulted in exception
[Feature] Now it's impossible to delete custom field used in other field formula

1.1.3 17-07-2020
[Feature] Formula custom fields are displayed as cfs[field_name(field_type)] for better readability, under hood formulas are still cfs[field_id] for backward compatibility

1.1.2 02-07-2020
[Feature] Formulas now can be edited

1.1.1 19-06-2020
[Fix] Available custom fields now contains only project specific fields 

1.1.0 18.06.2020
[Feature] Computed fields are now compatible with project_specific_custom_field plugin

Any question about our plugins? Please e-mail us at:

redmine.support@omegacode.pl

We’re open for your feedback and new features suggestions. There is always space for improvement!