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."
gajira-create
Run atlassian/gajira-create@v3
Error: {"errorMessages":[],"errors":{"issuetype":"Specify a valid issue type."}}
Diagnose it: produced, uploaded, or mapped?
Third-party integrations fail at one of three points, and the symptom is the same for all of them: the report was never produced, the upload was rejected, or the service could not map the paths back to your repository.
Terminal
ls -la <report-dir>/ && head -5 <report-file>
grep -c . <report-file> || echo "empty report"
# absolute paths in a report break server-side file mapping
grep -m3 -E "^(SF:|<file)" <report-file>
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 fields input.
Use customfield ids from /rest/api/3/field for this site.
.github/workflows/ci.yml
- uses:atlassian/gajira-create@v3with:project:ABCissuetype:Bugsummary:"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.
Frequently asked questions
What causes gajira-create issue "field" / project error in CI?
There are 2 common causes: wrong project key or issuetype name and a required custom field is missing or misshaped. The project input does not match a real key, or the issuetype name is not enabled for that project scheme.
How do I fix gajira-create issue "field" / project error in CI?
There are 2 fixes depending on which cause you have: set a valid project, issuetype, and fields and confirm allowed fields with createmeta. Work through them in order, since the first is the most common.
What does gajira-create issue "field" / project error in CI actually mean?
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."
How do I stop gajira-create issue "field" / project error in CI happening again?
Validate project keys and issuetype names against the target site. The prevention section lists 3 changes that keep it from recurring.