Jira Plugin - How to turn CustomFieldManager readonly programmatically ????

My problem is as follows:

I am wanting to create a display-only field that it will be kept a log of the history of a particular element.

Does anyone know how do I make a field readonly or print as text only, this programmatically?

2 answers

1 accepted

1 vote

You can make a field read-only by simply removing it from all but the "view" screens in Jira (the other types of screen are "edit", "create" and "transition", all of which make it editable by the users)

A second option would be to use the built-in "read only field"

A third option would be to create your own field *type* which behaves as you want.

Now, that's just covered the dsiplay options - what you also need to think about is getting the data in there. For options 1 and 2, there's pretty much one answer - write some code that extracts the data you need and pushes it into the field to be displayed later. Option 3 gives you another possibility - writing a "derived" field - that would display (and allow search) information on the issue without having to duplicate it into a field.

I would rather write a scripted field rather than writing a plugin that can show the data.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Apr 19, 2018 in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

366 views 0 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you