Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,162
Community Members
 
Community Events
185
Community Groups

How to use monospaced/code formatting in comment created by automation action?

Edited

Hello

According to linked markup help in Jira automation it's possible to use {{some text}} syntax to display text monospaced ("more formatting" --> "Code" resp. CTRL+SHIFT+M in new rich text editor).

However the double curly brackets are reserved for smart values in automation already.

How to use monospaced formatting within comments generated by automation?

Many thanks

2 answers

1 accepted

4 votes
Answer accepted

Hey Brat,

I came up with a workaound.

Create two variables:

  • openingCurlyBrackets with value \{\{
  • closingCurlyBrackets with value \}\}

Then you can set monospace text this way:


 {{openingCurlyBrackets.remove("\\")}}my text in monospace format{{closingCurlyBrackets.remove("\\")}} 

Cool, this really works! Many thanks Zakaria!

Like # people like this

thank you, this is so lame...

I went for this variation, create four variables:

  • codeOpenRaw with value \{\{
  • codeCloseRaw with value \}\}
  • codeOpen with value {{codeOpenRaw.remove("\\")}}
  • codeClose with value {{codeCloseRaw.remove("\\")}}

Then use it as {{codeOpen}}my text in monospace format{{codeClose}} 

this is so lame (it really is)

Like Zakaria Boutami likes this
Hcohen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Jan 04, 2023

If you need to use this in multiple words it's a little lengthier but this is what I did:

Set project-level entity properties for the four variables above in a one-time rule (pick a random issue and run a manual or scheduled trigger).

Use it as {{project.properties.codeOpen}}my text in monospace format{{project.properties.codeClose}} in any rule you want!

Like Zakaria Boutami likes this

Hi Brat!
You should open the smart value with a backslash
For example:

\{\{monospace\}\}

Hey Ignacio

Many thanks for your response. Unfortunately it didn't work in my rule:

This...
jira1.png
...becomes...
jira2.png

Do you see what I'm doing wrong?

Like brad likes this

I'm experiencing the same issue..

Like # people like this

Suggest an answer

Log in or Sign up to answer