Jason code to create a costom field

Hi,

I want to create a custom field by using rest API. Currently I'm using below jason code to create a custom field 

{

"name": "New custom field",

"description": "Custom field for picking groups",

"type": "com.atlassian.jira.plugin.system.customfieldtypes:grouppicker",

"searcherKey": "com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher"

 }

 

But when I'm trying to execute this code by using  curl command it throws below error.

image2016-5-16 14:14:33.png

Below is the log:

 

2016-05-16 14:29:19,891 http-nio-8080-exec-15 ERROR Abhaya 869x1979x1 1jnn3tk 10.11.61.24 /rest/api/2/issue/ [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor1047.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:83)
... 3 filtered
at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:55)
... 1 filtered
at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:39)
... 14 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
... 1 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
... 86 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
... 16 filtered
at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
... 74 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.initProjectAndIssueType(IssueInputParametersAssembler.java:294)
at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.buildForCreate(IssueInputParametersAssembler.java:265)
at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler.makeCreateAssembler(IssueInputParametersAssembler.java:131)
at com.atlassian.jira.rest.v2.issue.CreateIssueResource.createIssue(CreateIssueResource.java:49)
at com.atlassian.jira.rest.v2.issue.IssueResource.createIssue(IssueResource.java:596)


 

1 answer

0 vote

Read the application log file to find out what is going wrong internally.  jira-home/logs/atlassian-jira.log

image2016-5-16 14:31:1.png

Sorry, I can't read that.  Could you give us the plain text instead of a screenshot?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 16m ago in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

3 views 0 2
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