Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Placeholder for description field with scriptrunner for Jira datacenter

Siemen Roevens December 21, 2021

Hi all,

I trying to create a placeholder for my description field(text field). I already found that you can use scriptrunner to add an helptext or set the value of the field.

But I'm trying to add a placeholder(greyed out text in the field). In the past I used a Javascript script for this, but the new Jira version 8.11 won't support inline editing when you are using a javascript script for the placeholder.

Does somebody have a solution?

1 answer

3 votes
Joseph Chung Yin
Community Champion
December 21, 2021

@Siemen Roevens -

Hi Siemen:

Welcome to the community.  In JSM, you can add custom help-text for the fields when you setup your request type form.

2021-12-21_8-24-03.png

If your help-text needs to be formatted as a multi-line of text, the you can use the "\\" characters to create the multi-lines of text display... Example - "Option 1 \\ Option 2 \\ Option 3", this is what you will see in the request form for the specific field

2021-12-21_8-30-03.png

Hope this is what you are asking for.  This will be the simplest way to implement help-text.  Otherwise, you can also modify each JSM project's field configuration scheme to implement the help-text.

Lastly, if you are trying to add template text in the Description field, then you can use ScriptRunner for Jira (DC/Server env only) "Behavior" component to configure the template.  The only drawback of this solution, it is that user can override/delete the template text if they choose too.

Best, Joseph

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Siemen Roevens
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!
December 21, 2021

Hi Joseph,

First of all thank you for your reply. 

What you say is indeed a way to solve my problem, but I was hoping to use a placeholder instead of a help text.

By placeholder I mean the following:

placeholder.jpeg

But I don't think this is possible.

Best,
Siemen

Joseph Chung Yin
Community Champion
December 22, 2021

@Siemen Roevens -

You are correct.  Setting field to use a template value doesn't give you the control to set it as READ ONLY (so user cannot override the value).  The template value will be populated when the issue is created.  

Just want to confirm that you want the "Input Label" field to show no value in your request form?

Best, Joseph

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events