Script runner

Nanqing Zhou June 11, 2016

Hi,

When I use script runner, is there anyway to change the font size and color for the text? Thanks. 

3 answers

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2016

Which text?  Most of the text ScriptRunner will give you goes through the JIRA templates, so generally the answer will be "no, because it's not ScriptRunner formatting it".

There are some exceptions, where ScriptRunner will be able to use formatting - Mahesh has given you the main one - scripted field output, where your code should generate the raw html for output.  But I'm not sure from your question if that's the area you want.

0 votes
Boris Georgiev _Appfire_
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.
June 12, 2016

First - which part of Script Runner are you referring to  ? Scripted Fields maybe or something else ?

0 votes
Mahesh S
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.
June 12, 2016

Yes, you can set the template as html. When the result is set as html, we will be able to style tags, carrying the font size and font color.

Nanqing Zhou June 12, 2016

Can you show me how to set the template as HTML? Thanks very much.

Mahesh S
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.
June 12, 2016

In the JIRA Administration-> Add-ons-> Script runner -> Scripted fields. We can define the scripted fields and you can see the portability to get the template of the scripted field. There, you can display the output as html

Suggest an answer

Log in or Sign up to answer