Skip to content

Jira — Issue comments

Add a comment to a Jira issue.

Flags

  • --dry-run — Print the request that would be sent and exit without sending it.
  • --text <value> — Comment text.
  • --mention <value> — Account id, or a name or email to resolve. Repeatable.
  • --body <value> — Raw JSON request body.
  • --body-file <value> — Path to a file holding the raw JSON request body.

Connection

  • -e, --env-file <value> — Path to a .env file holding connection settings.
  • --jira-url <value> — Base URL of the Jira instance. (env: JIRA_URL)
  • --jira-username <value> — Account email for Jira Cloud basic auth. (env: JIRA_USERNAME)
  • --jira-api-token <value> — API token for Jira Cloud basic auth. (env: JIRA_API_TOKEN)
  • --jira-personal-token <value> — Personal access token for Jira Server/Data Center. (env: JIRA_PERSONAL_TOKEN)

Global

  • --json — the raw API payload, for scripts and agents.

The comment text is passed as plain text and converted to the shape the deployment expects — Atlassian Document Format on Cloud, a string on Server/DC. Use —body or —body-file for anything the text alone cannot express, such as restricting visibility to a role or group. Use —dry-run to see what would be sent without sending it.

Examples

Terminal window
simply atlassian jira issue comment add PROJ-123 --text "Deployed to staging"
Terminal window
simply atlassian jira issue comment add PROJ-123 --text "See the runbook" --dry-run
Terminal window
simply atlassian jira issue comment add PROJ-123 --body-file ./comment.json

simply atlassian jira issue comment delete

Section titled “simply atlassian jira issue comment delete”

Delete a comment.

Flags

  • --dry-run — Print the request that would be sent and exit without sending it.
  • --confirm — Required to proceed with an irreversible change.

Connection

  • -e, --env-file <value> — Path to a .env file holding connection settings.
  • --jira-url <value> — Base URL of the Jira instance. (env: JIRA_URL)
  • --jira-username <value> — Account email for Jira Cloud basic auth. (env: JIRA_USERNAME)
  • --jira-api-token <value> — API token for Jira Cloud basic auth. (env: JIRA_API_TOKEN)
  • --jira-personal-token <value> — Personal access token for Jira Server/Data Center. (env: JIRA_PERSONAL_TOKEN)

Global

  • --json — the raw API payload, for scripts and agents.

A deleted comment cannot be recovered through the API, so —confirm is required — the same rule “issue delete” follows. Comment ids come from “issue comment list”.

Examples

Terminal window
simply atlassian jira issue comment delete PROJ-123 10001 --confirm
Terminal window
simply atlassian jira issue comment delete PROJ-123 10001 --dry-run

Change an existing comment.

Flags

  • --dry-run — Print the request that would be sent and exit without sending it.
  • --text <value> — Replacement comment text.
  • --mention <value> — Account id, or a name or email to resolve. Repeatable.
  • --body <value> — Raw JSON request body.
  • --body-file <value> — Path to a file holding the raw JSON request body.

Connection

  • -e, --env-file <value> — Path to a .env file holding connection settings.
  • --jira-url <value> — Base URL of the Jira instance. (env: JIRA_URL)
  • --jira-username <value> — Account email for Jira Cloud basic auth. (env: JIRA_USERNAME)
  • --jira-api-token <value> — API token for Jira Cloud basic auth. (env: JIRA_API_TOKEN)
  • --jira-personal-token <value> — Personal access token for Jira Server/Data Center. (env: JIRA_PERSONAL_TOKEN)

Global

  • --json — the raw API payload, for scripts and agents.

Replaces the comment body — it does not append to it, since an edit that silently added text would be a surprising way to lose a comment’s meaning. Comment ids come from “issue comment list”; they are not visible in the Jira UI.

Examples

Terminal window
simply atlassian jira issue comment edit PROJ-123 10001 --text "Corrected: staging, not production"
Terminal window
simply atlassian jira issue comment edit PROJ-123 10001 --text "please review" --mention ada@example.com
Terminal window
simply atlassian jira issue comment edit PROJ-123 10001 --text "x" --dry-run

List an issue’s comments.

Flags

  • --limit <value> — Maximum number of comments to return. (default: 25)

Connection

  • -e, --env-file <value> — Path to a .env file holding connection settings.
  • --jira-url <value> — Base URL of the Jira instance. (env: JIRA_URL)
  • --jira-username <value> — Account email for Jira Cloud basic auth. (env: JIRA_USERNAME)
  • --jira-api-token <value> — API token for Jira Cloud basic auth. (env: JIRA_API_TOKEN)
  • --jira-personal-token <value> — Personal access token for Jira Server/Data Center. (env: JIRA_PERSONAL_TOKEN)

Global

  • --json — the raw API payload, for scripts and agents.

Shows one line per comment. Bodies are Atlassian Document Format on Cloud, so the preview column is flattened text; use —json for the unmodified payload.

Examples

Terminal window
simply atlassian jira issue comment list PROJ-123
Terminal window
simply atlassian jira issue comment list PROJ-123 --limit 5 --json