Create an issue with custom field values

Create an issue with custom field values

If you need to create Jira issues from a script and populate custom fields at the same time, Jira CLI lets you do it in a single command, without opening Jira.

The createIssue action sets standard fields like Project, Issue Type, Summary, Assignee, and Reporter, and the --custom parameter sets custom fields of different types, including Text, User Picker, and URL fields.

Standard fields

--action createIssue \ --project PROJ \ --type Task \ --summary "My issue" \ --assignee "jsmith" \ --reporter "admin"

This returns the key of the newly created issue, for example PROJ-123.

Adding custom fields

Custom fields are set using the --custom parameter in the format:

--custom customfield_ID:value

Replace customfield_ID with the actual ID, for example customfield_10001. You can find custom field IDs under > Issues > Custom fields, or by viewing the page source of any issue.

Custom field type: Text

--custom customfield_10001:"Some text value"

Custom field type: User Picker

For a single user, pass the username:

--custom customfield_10002:jdoe

For multiple users, separate usernames with a pipe (|):

--custom customfield_10003:jdoe|asmith|bwilson

Custom field type: URL

--custom customfield_10004:"https://example.com/page"

 

Example: all fields together

--action createIssue \ --project PROJ \ --type Task \ --summary "Automated deployment task" \ --assignee "jsmith" \ --reporter "admin" \ --custom customfield_10001:"Production Deployment" \ --custom customfield_10002:jdoe \ --custom customfield_10004:"https://jira.example.com/browse/PROJ-100"

 

  • Wrap values that contain spaces or special characters in double quotes.

  • Run with --simulate first to verify the command before it actually creates the issue.

  • Test in a non-production environment first.

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.