Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to set the value of a custom field via JRJC?


I'm trying to use JRJC to create an issue, and I must set a custom field before that is successful. I tried searching for examples, but did not find any.

Here's the code I am using to create the issue:

    Long testIssueTypeId = getTestIssueTypeId(projectKey);

    IssueInputBuilder builder = new IssueInputBuilder()

    IssueInput input =;

    return jira.getIssueClient().createIssue(input).claim();

 To the list of attributes, I need to set a custom field called "Application". In the JSON of a similar issue it appears like this:

  "self": "",
  "id": "14314",
  "disabled": false

What code do I need to add to the IssueInputBuilder to set this field's value? Or is there another, more preferred approach?




Here's what I've tried (for another custom field):

    IssueInputBuilder builder = new IssueInputBuilder()
        .setFieldValue("Test Type",
new CustomFieldOption(14314L, null, "Functional", null, null));


With this code, I get the following error:

RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={Test Type=Field 'Test Type' cannot be set. It is not on the appropriate screen, or unknown.}, errorMessages=[]}]}

0 answers

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events