This article is for Cloud. Visit Data Center
Sample Formulas - Markdown
Change Text Color
This example uses color-coded text to let users know when issue due dates are approaching (or overdue).
IF dueDate < today():Â
  ":panel[OVERDUE]{color=red}"Â
ELSE IF DAYS_BETWEEN(today(), dueDate) <= 7:Â
  ":panel[Due Soon]{color=green}"Â
ELSE IF DAYS_BETWEEN(today(), dueDate) > 7:Â
  ":smile:"Â
ELSE:Â
  ":panel[Needs Due Date]{color=blue}"
Change Background Color
This example changes the background color of the cell, according to the status category, and returns the summary text for each issue.
WITH format(text, color) = """:panel[${text}]{backgroundColor=${color}}""" :
CASE(status.category,
  "To Do", format(summary, "gray"),
  "In Progress", format(summary, "blue"),
  "Done", format(summary, "green")
)
You can easily customize this by changing the return value, altering the colors, or combining this effect with a larger formula.
Try experimenting with text and background color combinations - this can be a great way to draw attention to key data points.
Customizable Progress Bars - Based on a Custom Progress Field or Function
The following formula creates custom progress bars based on a custom progress field or user function.
We used the following formula to build the custom progress bar:
WITH simpleProgressBar(progress, maxProgress, stepCount) = (
WITH _bars(count, emoji) = REPEAT(emoji, count):
WITH doneBarsCount = FLOOR(progress / maxProgress * stepCount):
_bars(doneBarsCount, ":green_square:") CONCAT _bars(stepCount - doneBarsCount, ":white_large_square:")
):
simpleProgressBar(customProgress, 1, 10)
Starting with this, you can tailor the progress bar to your team's particular needs.
Colors can easily be configured by altering the "color" values - in this case, we used green and white squares.
The stepCount value can be adjusted depending on how many squares you want to visualize.Â
The progress calculation (customProgress) can be based on a custom field or custom user function. In the following example, we added a custom user function to mimic the default calculation in our Progress by Status column:
Customizable Progress Bars - Based on Status Categories
The following formula calculates progress based on the Status Categories of the issue and its children.Â