Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Text Field (read only)

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

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.

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

Untitled.png

 

Like this

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?

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

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.

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

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

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.

It's Perfect !  laugh

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

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

@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.

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

Okay. I see now.

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

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

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)

Ho, good!

Thank you very much!

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

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.

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

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.

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

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
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

106 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you