Tracker custom fields/6.1

From FusionForge Wiki
Jump to: navigation, search

This page in other versions: master

custom field is a tracker feature that proposes to extend default field on each tracker.

Custom field type

  • Check box
  • Datetime
  • Effort
  • Integer
  • Multi-select box
  • Radio buttons
  • Relation between artifacts (n-n relation type)
  • Release
  • Select box
  • Status
  • Text area
  • Text field
  • User

Configuration option of custom field

Each custom field requires the following information

  • Name
  • Alias

Optionals informations are:

  • Description:
  • Field is disabled
  • Field is mandatory
  • Hide this Field on a new submission

Optionals informations for Select Box / Check Box / Radio Buttons / Multi-Select Box / Release custom field type are:

  • Hide the default none value
  • Label for the none value

Optionals informations for Text Field / Parent artifact / Relation between artifacts / Integer / Effort custom field type are:

  • Size
  • Maxlength

Optionals informations for Text Area custom field type are:

  • Rows
  • Columns

Set formula on value of custom field


It is possible to perform the logical mathematical calculations on the extra fields.
Few examples about how the formula can be written:
?: (ternary operator) is used to write the if then elseif condition.
Cfa – text field
Cfb – select box with values (None, value1, value2)
Cfc – integer
Cfd – integer

  • If you want to write the condition (if then OR if then elseif) like,
    • if cfb = ‘value1’ then cfa = ‘My text1’ else cfa = ‘My text2’ then you have to write formula in cfa. The formula in cfa is : cfb == 'value1' ? 'My Text' : 'My Text2' ; (likewise it is possible to add elseif condition as well) (cfb == 'value1') ? 'My Text' : (cfb == 'value2') ? 'My text2' : 'My text3' ;
    • if cfb = ‘value1’ then cfa = ‘My text1’ (no else condition) The formula in cfa is : cfb == 'value1' ? 'My Text1' : ” ;
    • If cfb = ‘Value1’ then value of cfc will be cfd + 100 else cfd +200 The formula in cfc is : cfb == 'value1' ? cfd + 100 : cfd + 200;
  • Just set the value of cfc as cfd + 1000 The formula in cfc is : cfd + 1000 ; Likewise other operators can be used.
  • The parenthesis priority is supported.

(cfd * (1000 + 200))/100 ;

  • Usage of date in formula

To add into date:
cfb == 'value1' ?datetime_add(cfdate, 'P1D') : datetime_add(cfdate,'P2D');
To subtract from date:
cfb == 'value1' ?datetime_sub(cfdate, 'P1D') : datetime_sub(cfdate,'P2D');
To add into time factor of date:
cfb == 'value1' ?datetime_add(cfdate, 'PT1H') : datetime_sub(cfdate,'PT2H');
To subtract from time factor of date:
cfb == 'value1' ?datetime_add(cfdate, 'PT1H') : datetime_sub(cfdate,'PT2H');

Here in both the add and subtract example, ‘T’ is a prefix which indicates time factor of date and ‘H’ indicate hours.
Comparison on date : Formula in cfe which is a text type field
cfdate<= '2017-04-25' ? 'Cap' : 'Cap1' ;