FusionForge

Tracker custom fields/6.1

From FusionForge Wiki
Revision as of 14:21, 4 November 2017 by Nerville (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

  • Display name
  • Alias

Set formula on value of custom field

Tracker-formula-supported-functions.png

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.
Formulas:
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' ;