I need to create an issue with a custom field in JIRA

Vasanth Kumar November 24, 2017

I need to create an issue with a custom field in JIRA and this custom field is mandatory.

 

below option is not working:

image.png

Exception:

java.lang.UnsupportedOperationException: option is not a supported field type
at net.rcarz.jiraclient.Field.toJson(Field.java:616)
at net.rcarz.jiraclient.Issue$FluentCreate.executeCreate(Issue.java:104)
at net.rcarz.jiraclient.Issue$FluentCreate.execute(Issue.java:59)
at com.altisource.iam.services.jira.JiraService.createOrUpdateIssue(JiraService.java:202)
at com.altisource.iam.services.jira.JiraService.onTestStart(JiraService.java:104)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1695)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1670)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:615)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)
Some error occurred when writing step to jira!

 

2 answers

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 24, 2017

It looks like you are trying to add an option from a single-select type field to a multi-select field.  Could you confirm that the field types are what you think they are?

Vasanth Kumar November 27, 2017

The custom field looks like this:

image.png

We need to select one value out of this.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2017

And the field you are trying to add it to?

Vasanth Kumar November 27, 2017

Sorry but I did not get that. I'm reiterating the problem statement:

I need to create an issue in JIRA using JAVA API which has the above mentioned custom field (Test Type) as a mandatory parameter. I wrote the code snippet which looks like:

 

image.png

and I got an error.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2017

Could you re-read the answer I originally gave please? 

There's a reason I asked for more information there, and repeating the question does not provide the information.

0 votes
Boris Berenberg - Atlas Authority
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.
November 24, 2017

Probably better suited for https://community.developer.atlassian.com/

Vasanth Kumar November 27, 2017

Thanks!. I've posted it there too.

Suggest an answer

Log in or Sign up to answer