Setting description of customfield using Jira api doesnt actually reflect on UI until Jira is restarted

Setting the description of a custom field using the Jira API doesn't actually reflect the new value on the UI until Jira is restarted.


ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Field Name").setDescription("This is description of field");


4 answers

Try this-

String customFieldOldValue = customField.getValue(currentIssue);

ModifiedValue modifiedValue = new ModifiedValue(customFieldOldValue, newValue);
customField.updateValue(customFieldLayoutItem, currentIssue, modifiedValue, issueChangeHolder);

But you are talking about setting customfield value.

And am talking about setting customfield description not value.

Please read my question carefully.

0 votes
Henning Tietgens Community Champion Feb 11, 2014

For the custom field descriptions displayed in an issue the FieldLayoutManager stores the description. The description isn't automatically updated in the field layouts. Try


after updating the description.

no, it doesnt work,

someone pls help.

no, it doesnt work,

someone pls help.

0 votes
Henning Tietgens Community Champion Feb 25, 2014

I use this Groovy script (using Script Runner) to update the field description for all field configs. Maybe this is helpful for you.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.exception.DataAccessException
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.fields.layout.field.*

cfName = 'My Customfield'
cfDesc = ''

FieldLayoutManager fieldLayoutManager = ComponentAccessor.getFieldLayoutManager()
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()

// get all existing FieldLayouts
List<FieldLayoutScheme>	fieldLayoutSchemes =  fieldLayoutManager.getFieldLayoutSchemes()
List<Long> fieldLayoutIds = []
fieldLayoutSchemes.each{ fieldLayoutScheme ->
    Collection<FieldLayoutSchemeEntity> fieldLayoutSchemeEntities = fieldLayoutScheme.getEntities()
    fieldLayoutSchemeEntities.each{ fieldLayoutSchemeEntitiy ->
        fieldLayoutIds << fieldLayoutSchemeEntitiy.getFieldLayoutId()
fieldLayoutIds = fieldLayoutIds.unique()
List<FieldLayout> fieldLayouts = fieldLayoutIds.collect{Long fieldLayoutId -> fieldLayoutManager.getFieldLayout(fieldLayoutId as Long)}

// get custom field
CustomField cfObj = customFieldManager.getCustomFieldObjectByName(cfName)

// change description
fieldLayouts.each{fieldLayout ->
    FieldLayoutItem fieldLayoutItem = fieldLayout.getFieldLayoutItem(cfObj)
    if (fieldLayoutItem) {
        try {
            if (!fieldLayout.isDefault()) {
                efl = fieldLayoutManager.getEditableFieldLayout(fieldLayoutItem.getFieldLayout().getId())
                efl.setDescription(fieldLayoutItem, cfDesc)
            } else {
                efdl = fieldLayoutManager.getEditableDefaultFieldLayout()
                efdl.setDescription(fieldLayoutItem, cfDesc)
        catch (DataAccessException e) {
            log.error "$e"

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,531 views 15 21
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