Custom field doesnt working for new Issue Type

Hi Everyone,

I have created new custom field plugin extending SelectCFType.
Custom field works properly for predefined Issue Types (example : Bug,Task,Test etc)
but when i create a new issue type and add my new custom field to that issue type.
My options doesnt load and it renders no options.

When i check the log file i see this exception below;

/secure/admin/ConfigureCustomField!default.jspa [webwork.util.ValueStack] METHOD: "viewHtml", exception:






What is the reason for this NullPointerException ? Have anyone help me ?


4 answers

Hi Batuham,

Good idea to check the log files. Did you configure the plugin's velocity view template in the atlassian-plugin.xml? Can you verify atlassian-plugin.xm making sure there are no typos and that the templates exsist where the resource says they are located? Another thing it could be is that your template is asking for data that is not available to is from the getVelocityParameters method call. Check to make sure what Velocity is asking for is available in that data structure.

Good luck

Thank Thomas,

velocity file is located properly because while addind custom field, if i select "any issue type" there is no problem.

I tried, i selected "any issue type" and added new custom field then i modified its configurations to any other issue type there is no problem.

The problem at the creation of custom field; it doesnt work issue types except "any issue type".


Do you think you didn't configure the custom fields correctly? Is there anything special about your custom fields I need to know? I would suggest a quick test. Remove your custom fields from the issuse then add 1 custom field of the built-in types shipped with JIRA. Keep track of the steps you took. I would not suggest using a global context to make sure you have the right steps. If the new custom field shows up as expected in JIRA, then use those steps to add your custom fields back to the project. Follow this documentation:

Once we know custom fields can be installed corretly and if the problem is still there then look more closely at the design and coding of your plugin.

Have you followed the create a custom field plugin for JIRA before succesfully?

Thank You Thomas,

I found the problem source.

FieldConfig fieldConfig = null;

if(issue == null)


fieldConfig = field.getReleventConfig(new SearchContextImpl());

} else


fieldConfig = field.getRelevantConfig(issue);


if i implement like this fieldConfig value becomes null and velocity renders nothing.

I changed it at below, by giving specific IssueTypeID i solved the problem.

FieldConfig fieldConfig = null

if(issue == null){

fieldConfig = field.getRelevantConfig(new IssueContextImpl(null,issueTypeID));

}else {

fieldConfig = field.getRelevantConfig(issue);


Is there any another effective way ? Thanks your care

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,100 views 4 9
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