gajira-create issue "field" / project error in CI
atlassian/gajira-create posts to the Jira create endpoint. It fails when the project key does not exist, the issuetype is not valid for that project, or the fields input omits a required field or uses the wrong id.
What this error means
The gajira-create step errors with a Jira 400 body naming the project, issuetype, or a field, such as "issuetype: Specify a valid issue type."
Run atlassian/gajira-create@v3
Error: {"errorMessages":[],"errors":{"issuetype":"Specify a valid issue type."}}Common causes
Wrong project key or issuetype name
The project input does not match a real key, or the issuetype name is not enabled for that project scheme.
A required custom field is missing or misshaped
The create screen requires a field the fields YAML omits, or a custom field is given by name where an id or option object is required.
How to fix it
Set a valid project, issuetype, and fields
- Confirm the project key and that the issuetype exists for it.
- Pass extra required fields as JSON in the
fieldsinput. - Use customfield ids from
/rest/api/3/fieldfor this site.
- uses: atlassian/gajira-create@v3
with:
project: ABC
issuetype: Bug
summary: "CI failure on ${{ github.sha }}"
fields: '{"customfield_10021": 3}'Confirm allowed fields with createmeta
Query createmeta for the project and issuetype to learn required fields and their exact shapes before creating.
How to prevent it
- Validate project keys and issuetype names against the target site.
- Resolve customfield ids per site and pass them via
fields. - Check createmeta so required fields are supplied up front.