Forums

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

Write to/Read from hidden JIRA custom field programmatically

Deleted user July 30, 2019

Hi,

is there any way I can write to a custom field that is not displayed in any screen? I have read that fields that are not displayed on a screen will not be filled when writing to them. Likewise, custom fields that are not displayed on screens will produce a NullPointerException when trying to read their assigned value.

Do I necessarily have to display a custom field on my screens in order to write to them or read from them, or is there any way to avoid displaying them while still being able to read/write the information?

My plan is to do all of this programmatically in Java and not with any user settings in Jira. It's supposed to run as part of a plugin.

Thank you.

2 answers

1 accepted

0 votes
Answer accepted
Deleted user July 30, 2019

I figured it out by accessing custom fields with the CustomFieldManager and skipping the screen check on writing to the field

0 votes
Sreenivasaraju P
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.
July 30, 2019

@[deleted] ,

You can update any field or read any field using JIRA API. It is not necessary to have that field  on view/edit screen. 

But when you update that field , change will be reflected under history tab.

Deleted user July 30, 2019

Thanks for your answer! How would I go about that? Because everything I've tried so far resulted in the errors mentioned above i.e. the field not being set or getting the value returning null.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events