Text Field (read only)

Antoine
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.
August 31, 2016

I don't understand how this field works, i can't set any value ..

 

Is someone know ?

1 answer

1 accepted

3 votes
Answer accepted
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.
August 31, 2016

It's a bit buried in the docs, but it is there - the field "can only be set by code or when importing".  There is no code for setting it in the core of JIRA (apart from the import option), you have to find or write an add-on to do it.

What are you trying to use the field for?  I ask because there may be a better option - a lot of people try to set this field when they want to put text on screen - this would unnecessarily fill up your database with lots of static duplicated data, and won't come out on the "edit" type screens anyway.  There's a different answer to that.

Antoine
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.
August 31, 2016
Thank you for your answer Nic, what I want to do is display on the issue creation screen, a read-only field including a link to a documentation page.
So I thought to do so via this type of field
Antoine
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.
August 31, 2016

Untitled.png

 

Like this

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.
August 31, 2016

Ok, a read-only text field won't work - they only show up on issue-view and searches. 

Is that going to be the same url every time, or is it going to vary by issue/project?

Antoine
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.
August 31, 2016

For now it should be the same link, but if the need arises there will be the possibility to create a new field

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.
August 31, 2016

Ok, there's a long-standing answer to this one (since JIRA 2). 

  • Install the (well supported and free) JIRA Toolkit add-on. 
  • Add a new custom field of type "message field for edit"
  • Place it on the "create issue" screen (and others if needed)
  • Set the default value to your text
  • You probably need to mess with the formatting of the string a little bit, injecting simple html to get the layout right

It will appear on create (and whereever else you've added it), and you can change it later if you need to.  And you can add more of them if you want.  The field doesn't add data to issues, it's just some code that says "display the default value as a string" rather than a real field.

Like # people like this
Antoine
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.
August 31, 2016

And can i do it for a simple string ? Not URL etc .. ?

Antoine
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.
August 31, 2016

Thanks for your answer, i'm going to try ! 

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.
August 31, 2016

Any string you want.  In fact, I'd just get a simple "hello world" in there first to see where it lands, and then start adding formatting and real data later.

Antoine
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.
August 31, 2016

It's Perfect !  laugh

roniz February 16, 2017

after installing the Toolkit add-on im trying to add a new custom field but cant find the type of ""message field for edit"

Krzysztof Hotiuk April 5, 2018

Hi,

in jira software, works fine.. Any idea how to reach this in customer portal in jira SD?

custom field both types (view and edit) are as empty and editable field when shown on portal :(

regards,

Krzysztof

Joanne Dinh January 10, 2019

@Krzysztof Hotiuk - not sure if this is what you are after:

https://jira.atlassian.com/browse/JSDSERVER-570

This refer to 'Help and instructions' field for an issue type. I use it to display text and get people to confirm read.

Enver_Haase November 18, 2019

@Nic Broughdo I understand correctly that "code" does not mean any REST API call, but only local API through Add-Ons?

Enver_Haase November 19, 2019

Okay. I see now.

A custom field has to be referenced as "customfield_"+custFieldId .

Ruth Ariel January 8, 2020

Hi @Nic Brough

Is your solution - using JIRA Toolkit add-on - just for JIRA Server?

Do you know if there is any solution to put some titles or URLs for read only that doesn't add data to issues, in JIRA Cloud?

Thanks,

Ruth

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.
January 8, 2020

Cloud has the Toolkit pre-installed.   Try adding a custom field of type "message (for X)"

(But you might need to ask Atlassian to enable it)

Ruth Ariel January 11, 2020

Ho, good!

Thank you very much!

Henry Avila May 4, 2020

Hi.

I try set null value on read only field, but it can´t take affect.

I am using rest api 3

Help me please.

 

ErrorCapture.PNG

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.
May 4, 2020

The read-only field is read-only.  It can only be set by import or code running inside Jira.

REST is an external interface, not an internal function.

Henry Avila May 4, 2020

Hi @Nic Brough -Adaptavist- 

The problems is only for set null value. If I set whatever value it is updated on Jira.

I also try using scriptrunner but the problem persist, additional I am using Jira Cloud

Claire Berry February 24, 2021

Hi @Nic Brough -Adaptavist- 

I'm having similar issues. I want to create a read only text field on a request to give more information when a previous option is selected from a single choice select list. 

I have done what you advised here, installed the Jira Toolkit and created a Message Custom Field (for edit) field. I've set the default in the config. But when I add it to my request, it just comes up with a normal single line text field, with nothing pre-set and is editable. field.PNG

Any advice here? Thanks.

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.
February 24, 2021

That does not look like a message field to me.

However, I do not know how message fields might work on requests, I've only used them on issues

Claire Berry February 26, 2021

I've found a way to do this. I've used the Text Field (multi-line) custom field and set it as read-only in the Behaviors section which I only just found.
Settings > Manage Apps > Scriptrunner > Behaviours

Unfortunately this only works with default field types, and not for the Diviniti Rich text field which would have been nice.

Suggest an answer

Log in or Sign up to answer