I created an issue for one of my project and when I try to edit the issue to make some change to the description I get a java NullPointerException. This issue happen to every issue I created. Note that i've added a Cascading Customs fields that ask for the device where the bug happened (Android, iPhone, desktop, etc.) and the other field ask the version (Froyo, Jellybean or io4,5,6 or Browser).

1 answer

1 accepted

This widget could not be displayed.

Hi,

Just to make this available to anyone facing the same issue, please allow me to comment here what was the problem and resolution of this:

2012-10-24 10:28:28,172 http-5472-7 ERROR xxxxxxx 628x23110x1 xxxxx XXX.XXX.XX.XX /secure/QuickEditIssue.jspa [jira.bc.issue.DefaultIssueService] Exception occurred editing issue: java.lang.NullPointerException
java.lang.NullPointerException
	at com.atlassian.jira.issue.customfields.impl.CascadingSelectCFType.getChangelogValue(CascadingSelectCFType.java:390)
	at com.atlassian.jira.issue.customfields.impl.CascadingSelectCFType.getChangelogValue(CascadingSelectCFType.java:69)

Based on the above stack trace that was displayed in your logs, I believe that you are hitting into a bug in JIRA, and which would definitely explain the reason you started to see this error after adding the Cascading Select Custom Fields, as this bug is caused when nothing is selected in the Cascading Select Field, see JRA-28076.

This bug is currently "Awaiting Development", so we can't promise a fix as of yet, but it will be reviewed by a developer for possible fix, and when (if) developer review begins, the status of the issue will change to "In Progress". Anyhow, I've added this case as a private comment for the dev's review, and would also advise you to watch the bug report to receive future notifications regarding it. Nevertheless, as a workaround to fix this problem, you may replace the "Please Select" option with "None", as per mentioned in the bug report:

  1. Shutdown JIRA
  2. Backup and modify the file <tt><jira-install>\atlassian-jira\WEB-INF\classes\templates\plugins\fields\edit\edit-cascadingselect.vm</tt>from
    <select class="select cascadingselect-parent" id="${customField.id}" name="${customField.id}">
            <option class="default-option" value="">$i18n.getText("common.words.pleaseselect")</option>
            <option class="default-option" value="-1">$i18n.getText("common.words.none")</option>
            #foreach ($option in $configs.options.rootOptions)
                #if(!$option.disabled || $option.disabled == false || ($selectedParent && $selectedParent == $option.optionId.toString()))
                    <option class="option-group-$option.optionId" value="$option.optionId"#if ($selectedParent && $selectedParent == $option.optionId.toString()) selected="selected"#end>$cfValueEncoder.encodeForHtml($option.value)</option>
                #end
            #end
        </select>
        <select class="select cascadingselect-child" id="${customField.id}:1" name="${customField.id}:1">
            <option class="default-option" value="">$i18n.getText("common.words.pleaseselect")</option>
            <option class="default-option" value="-1">$i18n.getText("common.words.none")</option>
            #foreach ($parentOption in $configs.options.rootOptions)
                <option class="option-group-$parentOption.optionId" value="">$i18n.getText("common.words.pleaseselect")</option>
                <option class="option-group-$parentOption.optionId" value="-1">$i18n.getText("common.words.none")</option>

    to

    <select class="select cascadingselect-parent" id="${customField.id}" name="${customField.id}">
            <option class="default-option" value="">$i18n.getText("common.words.none")</option>
            <!-- <option class="default-option" value="-1">$i18n.getText("common.words.none")</option> -->
            #foreach ($option in $configs.options.rootOptions)
                #if(!$option.disabled || $option.disabled == false || ($selectedParent && $selectedParent == $option.optionId.toString()))
                    <option class="option-group-$option.optionId" value="$option.optionId"#if ($selectedParent && $selectedParent == $option.optionId.toString()) selected="selected"#end>$cfValueEncoder.encodeForHtml($option.value)</option>
                #end
            #end
        </select>
        <select class="select cascadingselect-child" id="${customField.id}:1" name="${customField.id}:1">
            <option class="default-option" value="">$i18n.getText("common.words.none")</option>
            <!-- <option class="default-option" value="-1">$i18n.getText("common.words.none")</option> -->
            #foreach ($parentOption in $configs.options.rootOptions)
                <option class="option-group-$parentOption.optionId" value="">$i18n.getText("common.words.none")</option>
                <!-- <option class="option-group-$parentOption.optionId" value="-1">$i18n.getText("common.words.none")</option> -->
  3. Restart JIRA
    This modification will remove the 'Please select' in the option and replace it with the word 'None'

Best regards,
Matheus Fernandes
Atlassian Support

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 7 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

13 views 0 0
Join discussion

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