Create new Jira issues with specified fields using YAML format for issue data.
| Input name | Data type | Required? | Description |
|---|---|---|---|
|
String |
Yes |
Jira instance URL (e.g., |
|
String |
Yes |
Jira username or email address |
|
String |
Yes |
Jira API token |
|
String |
Yes |
Project key where the issue will be created (e.g., |
|
String |
Yes |
Issue type name (e.g., |
|
YAML Object |
Yes |
YAML object containing issue fields like summary, description, etc. |
|
Boolean |
No |
Whether to send notifications to users about the new issue. Default is |
|
Boolean |
No |
If |
| Output name | Data type | Description |
|---|---|---|
|
String |
The key of the created issue (e.g., |
|
String |
The internal ID of the created issue |
|
String |
The URL to view the created issue |
- name: Create bug report
uses: https://github.com/cloudbees-days/jira-create-issue@v1
id: create-bug
with:
jira-url: ${{ vars.JIRA_URL }}
jira-username: ${{ vars.JIRA_USERNAME }}
jira-token: ${{ secrets.JIRA_TOKEN }}
project-key: "PROJ"
issue-type: "Bug"
issue-fields: |
summary: "Application crashes on startup"
description: |
Application crashes during initialization.
**Build:** ${{ cloudbees.run_id }}
**Commit:** ${{ cloudbees.scm.sha }}
priority:
name: "High"
labels:
- "bug"
- "critical"
- name: Show created issue
run: |
echo "Created issue: ${{ steps.create-bug.outputs.issue-key }}"
echo "URL: ${{ steps.create-bug.outputs.issue-url }}"- name: Create user story
uses: https://github.com/cloudbees-days/jira-create-issue@v1
with:
jira-url: ${{ vars.JIRA_URL }}
jira-username: ${{ vars.JIRA_USERNAME }}
jira-token: ${{ secrets.JIRA_TOKEN }}
project-key: "PROJ"
issue-type: "Story"
issue-fields: |
summary: "As a user, I want to export data"
description: |
User story for data export functionality.
**Acceptance Criteria:**
- Export button available
- CSV format supported
- Download starts immediately
assignee:
accountId: "557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"
labels:
- "feature"
- "export"
customfield_10001: "8" # Story points-
Go to [Atlassian Account Settings](https://id.atlassian.com/manage-profile/security/api-tokens)
-
Create an API token
-
Store as secrets/variables in CloudBees:
-
JIRA_URL: Your Jira instance URL -
JIRA_USERNAME: Your email address -
JIRA_TOKEN: Your API token (store as secret)
-
Common field formats for the issue-fields YAML:
# Required
summary: "Issue title"
# Optional standard fields
description: "Issue description"
priority:
name: "High" # High, Medium, Low
assignee:
accountId: "user-account-id"
labels:
- "label1"
- "label2"
# Custom fields (use field ID from Jira)
customfield_10001: "Text value"
customfield_10002: 42 # NumberThis code is made available under the MIT license.
-
Learn more about using actions in CloudBees workflows.