You have two options of formatting code in JIRA:

  • using a plugin
  • using code template

In this post I'll add several templates for:

Add JIRA comment with Python code


def fib(i):
    if i <= 2:
        return 1;
        f = fib(i-1) + fib(i-2)
        print('calc', i)
    return f


Add JIRA comment with SQL code


select * from mytable


Add JIRA comment with Java code

You can add additional parameters like:

  • title
  • borderStyle


public class HelloWorld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");