This article is for Cloud. Visit Data Center

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

By adding markdown to a formula column, you can call attention to critical information, color-code data fields, or add other visual customization to a structure:

  • Specify the text formatting
  • Add text and background color
  • Insert emojis

Structure with Markdown Language

Using Markdown

To add markdown to a formula column:

Click the Add Column button (+) and select Formula

  1. Include markdown language in your formula column, surrounded by double quotes ("). See 3667890728 below for more details.
  2. Under Options, select Markdown

Markdown option

Your formatting will not display correctly unless the Markdown option is selected.

Markdown Formatting

The following sections explain how to add text formatting, color, and emojis to a formula column.

Text Formatting

The following markdown can be used for text formatting.

Text FormattingFormatExample

Result

Italics*Text*"My Favoirte book is *The Lord of the Rings*"My favorite book is The Lord of the Rings
Bold**Text**"**STOP!**"STOP!
Heading 1# Text

"# Section One"

Heading 2###### Heading 2 Text

"###### Sub-section Two"

Code Snippet

` Code Snippet `

Note: These are backticks, not apostrophes.

"`<var_name> = <value>`"<var_name> = <value>

Text and Background Color

The following markdown can be used to specify background and text colors.

FormattingFormat (using name)Alternative Format (using hex value)Result
Text Color

:panel[text]{color=red}

:panel[text]{color=#FF0000}

text
Background Color:panel[text]{backgroundColor=green}:panel[text]{backgroundColor=#008000}


Text and Background Color:panel[text]{color=white backgroundColor=green}:panel[text]{color=#FFFFFF backgroundColor=#008000}

Emojis

A variety of emojis are available, including smiley faces, symbols, flags, and more. Emojis can be added using the following format: :Emoji_Name:

EmojiFormatExampleResult
Smile Face:smile:"Great Job :smile:"

Smiley Cat:smiley_cat:":smiley_cat: Purr!"

Flag:triangle_flag_on_post:":triangular_flag_on_post: IMPORTANT"

For a complete list of available emojis, see https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md

Some emojis may not work with all operating system and browser combinations.

Using Variables and Expressions

You can also create conditional formatting using variables and expressions by including markdown in a Text Snippet. In the following example, we've color-coded the assignee name based on their team.

WITH Color_Coded(name, textColor) =
    """:panel[$name]{color = $textColor}""":


IF (Team = "Team A"):
   Color_Coded(Assignee, “red”)
IF (Team = "Team B"):
   Color_Coded(Assignee, “blue”)
Text snippets are enclosed on both sides by three double quotes (""").

Hyperlinks are supported for items within the current Jira / Confluence instance only.

For security purposes, hyperlinks are not supported for locations outside the parent Jira or Confluence.

Examples

Example 1: Progress Warnings

In the following example, we created a simple formula to draw attention to items that are overdue or nearing their due dates:

  • When an issue is overdue, a red "OVERDUE” warning appears in the column
  • When an issue is due within the next 7 days, the column displays a green “Due Soon”
  • When there's over a week to go, the issue gets a smiley face
  • If an issue doesn't have a due date, it let's you know

Due date warnings

To accomplish this, we added markdown language to an IF statement:

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}"

To learn more about using If statements, DAYS_BETWEEN, or any other functions, see Expr Function Reference.

Example 2: Project Markers

In this example, we've created a color-coded column to quickly identify each project we're working on.

Color-coded projects

To create this column, we used the CASE function and circle emojis:

CASE(project, "SAFe Program", ":red_circle:", "SAFe Team A", ":purple_circle:", "SAFe Team B", ":green_circle:", "Marketing", ":large_blue_circle:")

Example 3 - Issue Health

The example we used at the top of this article helps users visualize the health of each issue by calculating the amount of time until its due date and comparing that with the remaining estimate:

  • If the remaining estimate exceeds the time until the due date, it's marked "At Risk"
  • If the time until the due date is greater than the remaining estimate, but by less than 15 days, it's marked "Normal"
  • If the time until the due date is greater than the remaining estimate by more than 2-weeks, or the issue is done, it's marked "Awesome"

Issue Health column

with WORK_TIME_TO_CALENDAR_TIME(time) = (
  with min = 60 * 1000:
  with hour = 60 * min:
  with day = 8 * hour:
  with week = 5 * day:
  with weeks = FLOOR(time / week):
  with r1 = time - weeks * week:
  with days = FLOOR(r1 / day):
  with r2 = r1 - days * day:
  with hours = FLOOR(r2 / hour):
  with r3 = r2 - hours * hour:
  with mins = r3 / min:
  (((weeks * 7 + days) * 24 + hours) * 60 + mins) * min
):

with FORMAT_CAPTION(color, caption) = (
  """:panel[$Caption]{backgroundColor=$color color=white}"""
):

with diff = FLOOR((due_date - (TODAY() + WORK_TIME_TO_CALENDAR_TIME(sum {remaining}))) / 86400000):


IF status = "done":
  FORMAT_CAPTION("#59B161", ":sunny: **Awesome**")
ELSE IF diff < 0:
  FORMAT_CAPTION("#EF4B59", ":cloud_with_lightning_and_rain: &nbsp;&nbsp;**At Risk&nbsp;&nbsp;&nbsp;**")
ELSE IF diff < 15:
  FORMAT_CAPTION("#FFAF00", ":sun_behind_large_cloud: &nbsp;&nbsp;**Normal**&nbsp;&nbsp;")
ELSE:
  FORMAT_CAPTION("#59B161", ":sunny: **Awesome**")


  • No labels