How to configure JIRA to use JavaScript as the default language in {code} blocks?

vgrizly March 13, 2015

Documentation says that Java is the default language (http://prntscr.com/6g88zy), but how can I change it to JavaScript (or anything else)?

I mean this {code} block: http://prntscr.com/6g88a8

1 answer

1 accepted

1 vote
Answer accepted
teilor_soares
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2015

You can add the language as a parameter when opening the code block, like {code:java}, {code:sql} etc.

Cheers!
Teilor

 

vgrizly March 13, 2015

Yep, but we have a pure JS project, and I do not want to add the parameter every time, I want to make it default.

Like # people like this
teilor_soares
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2015

Not possible today, just changing the source code of JIRA. Although, there is a improvement request about this https://jira.atlassian.com/browse/JRA-29184

vgrizly March 13, 2015

Here's how. Okay, thank you for answer.

Joris Vleminckx May 31, 2019

https://jira.atlassian.com/browse/JRASERVER-29184 was closed without fixing this. It's 2019 now and still it isn't possible to set a new default (or remove the "java one") for the code block language :-/

Like Enric Martinez likes this
Alexion Software May 6, 2020

Same for me here. We program in pyhton only and would realy like to be able to set the {code} option to python or otherwise to None

Like Sheila Allen likes this
Enric Martinez June 30, 2020

It's 2020, 5 years after this comment and after the request was made. It is still not possible.

It is already an utter annoyance to have to type the whole {code}{code} thing every time instead of a backtick and having to replace `java` with whatever language you use is not helping either.

I really wonder what you Atlassian guys had in mind when doing that? what's the target audience? Kindergartens?  Because even for people who develop in Java there's still this annoying code block thingy instead of a simple backtick.

I work for an academic institution (SURFSara, Dutch supercomputing facilities) and we mostly use bash. We recently migrated from an inhouse solution based on TRAC and email and I am already regretting it (and I was one of the mayor backers of the change).

Solution: Of course, pay for a plugin, innit ?

Like Sheila Allen likes this

Suggest an answer

Log in or Sign up to answer