Formulas

About Formulas

Portfoleon supports formulas in automation rules to perform simple calculations.

Portfoleon formula engine supports the following capabilities:

  • Simple arithmetic operations, +, -, *, /, and ().
  • Custom fields as fields.field_code, where field_code is the code of the field in the field editor.
  • Work item built-in fields:
    • id: internal work item identifier
    • code: work item code
    • percent_complete: work item percent complete
    • status_id: current work item status identifier
    • dt_report: the date when the status was last updated
  • Special values:
    • @Me is the current user ID
    • @MeResource is the current user’s resource ID (if that resource is linked to the user)
    • @Today is the current date
  • Functions written in a form function_name(parameter1, parameter2, ..., parameterN)

Functions

If

if(condition, result_if_true, result_if_false)

if will return the result depending on the condition.

Days Between

days_between(date1, date2)

days_between will return distance in days between date1 and date2. The distance will be positive if date2 is later than date1, otherwise it will be negative.

Days Add

days_add(date1, days)

days_add will return a date that is date1 shifted by the amount of days days.