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

How to make custom fields read only? Edited

I create a Text Field (read only) field and use it in a project. I should be only able to change the field via code. However I can still edit the field via the edit screen. What is wrong for me? How to make it truly read only?

2 answers

Hi @Travis Tai , Welcome to the community.

Remove the field from the CREATE and EDIT screens and put the field in VIEW screen only.

Thanks,
Ram.

It may works, but what is the point for creating a field with read only option?

Perhaps it may be reading in a Date Time stamp from another application. Which is what I'm trying to do, but when I remove it from Edit, it removes the field from Create and View. :(

Hi,

I have exact the same issue, if I remove the field from any screen → it is removed from all (VIEW, EDIT, CREATE)

Anyone know how to achieve the read-only field without doing any shenanigans?

This should be a basic functionality of custom fields...

Hi Ondřej,

You have to have two separate screens in the same screen scheme for this to work.  One screen can be the View screen and the other can be used for Create and Edit. 

One simple way to do it is to fins your screen in the list of screens in the Admin section, copy that screen and name it something like "<screen name> view-only screen", where <screen name> is the name of the original screen.

Then go to the project's screen scheme and associate the View issue operation with the new "...view-only screen".

Finally, configure the original screen to remove the field you don't want users to edit.  If the field is non-empty you will see it when viewing the issue. But you won't be able to click-on it to edit it, and it won't appear in the edit screen.

If you need some help around the configuration part, this should point you there: https://confluence.atlassian.com/adminjiraserver/associating-a-screen-with-an-issue-operation-938847289.html

Good luck!

Hi Jordan,

thank you very much for your reply!

Kind regards, Ondrej

I got this to work using Script Runner, and did these steps:

More info: https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html

Project: EXAMPLE

Custom Field: Required Fix Date

Issue Type used: Bug

This field is to be read-only written from EXAMPLE project.

Set up:

Go to Applications → Manage Apps → Behaviours (Left Nav bar)

  1. Add Mapping → EXAMPLE project & Issue Type = Bug
  2. Add Field → Required Fix Date

SAVE

Hi Tad,

thank you very much for posting your solution with the howto guide.

I'll try to set the behaivour as you had and fiddle with it a little.

Cheers, Ondrej

Like Tad Foster likes this

Suggest an answer

Log in or Sign up to answer
TAGS

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