needs-you

Guides

Jira

Get a card when something happens on a Jira issue assigned to you: someone moves it to another status, comments on it, mentions you, or assigns it to you. One card per issue, updated in place, with a button that opens the issue (or the comment). It clears itself when the issue is done, when it's no longer yours, when you act on it yourself (comment, move it), or after a day with nothing new. Works with Jira Cloud and Jira Data Center 8.14 or later.

A small poller, needs-you-jira, does this from one machine every 5 minutes, with a token you give it. Nothing in Jira changes: no webhook, no Jira app, no public endpoint. It's off until you set it up.

Before you start #

Set up #

# 1. Install the poller (or `install -m 755 integrations/jira/needs-you-jira ~/.local/bin/` from a checkout)
curl -fsSL https://raw.githubusercontent.com/tayharris/needs-you/main/integrations/jira/needs-you-jira -o ~/.local/bin/needs-you-jira && chmod 755 ~/.local/bin/needs-you-jira

# 2. Save the token in a file only you can read (it isn't echoed or kept in your shell history)
mkdir -p ~/.config/needs-you && (umask 077; printf 'Jira token: '; read -rs t; printf '%s\n' "$t" > ~/.config/needs-you/jira-token); echo

# 3. Turn it on: your site, and for Jira Cloud your email
cat >> ~/.config/needs-you/env <<'EOF'
NEEDS_YOU_JIRA_SITE=https://acme.atlassian.net
[email protected]
EOF

# 4. Check it can read Jira (the first run only records your open issues; it posts nothing)
~/.local/bin/needs-you-jira -v

# 5. Run it every 5 minutes
(crontab -l 2>/dev/null; echo '*/5 * * * * $HOME/.local/bin/needs-you-jira >/dev/null  # needs-you-jira') | crontab -

For Data Center, step 3 is just the base URL (NEEDS_YOU_JIRA_SITE=https://jira.acme.example, with a context path such as /jira if yours has one); the poller uses your personal access token as a Bearer token. Set NEEDS_YOU_JIRA_AUTH=dc if your Data Center site happens to end in .atlassian.net, or cloud for a Cloud site on a custom domain. If the server's certificate comes from your company's own CA, put that CA in a PEM file and set NEEDS_YOU_JIRA_CA_FILE=/path/to/acme-ca.pem: the poller then trusts only that CA, and still checks the certificate and host name.

The token file must be yours and mode 600. If it isn't, the poller refuses it and tells you to chmod 600 it: anyone who can read it can act as you in Jira.

Prefer a systemd user timer or, on a Mac, a LaunchAgent? Use the files in integrations/jira instead of step 5.

Or let an agent set it up #

On your Mac, Settings → Integrations → Cards from your tools → Jira has the same commands with Copy buttons, and Copy agent prompt. Paste the prompt into Claude Code (or another agent) on the machine that will run the poller. It holds no token: the agent asks you to run step 2 in your own terminal and paste the token there yourself.

Set up needs-you cards for Jira on this machine. The guide is https://github.com/tayharris/needs-you/blob/main/docs/guides/jira.md.
This machine must already send needs-you alerts: if ~/.local/bin/needs-you is missing or ~/.local/bin/needs-you doctor shows a FAIL, stop and ask me for an invite link (Needs You on my Mac: Settings → Connect a machine).
Install the poller: `curl -fsSL https://raw.githubusercontent.com/tayharris/needs-you/main/integrations/jira/needs-you-jira -o ~/.local/bin/needs-you-jira && chmod 755 ~/.local/bin/needs-you-jira`.
needs-you-jira reads my Jira token from ~/.config/needs-you/jira-token, which must be mine and mode 600. Never ask me for the Jira token in chat, never print it, and never put it in ~/.config/needs-you/env, a cron line, a command or any file you write. Ask me to run this in my own terminal and paste the Jira token there myself (it isn't shown; press Enter after it), and wait until I say it's done: `mkdir -p ~/.config/needs-you && (umask 077; printf 'Jira token: '; read -rs t; printf '%s\n' "$t" > ~/.config/needs-you/jira-token); echo`. Then check only the file's mode with `ls -l ~/.config/needs-you/jira-token`: never read the file.
Settings go in ~/.config/needs-you/env, which also holds this machine's needs-you token: only append lines to it (`echo 'NAME=value' >> ~/.config/needs-you/env`), never print, read out or rewrite it.
Ask me for my Jira site URL and append it as NEEDS_YOU_JIRA_SITE=https://... . For Jira Cloud (a site on atlassian.net) also ask for the email I sign in with and append NEEDS_YOU_JIRA_EMAIL. The token is an API token from id.atlassian.com for Cloud, or a personal access token for Data Center.
Its first run only records my open issues and posts nothing.
Run `~/.local/bin/needs-you-jira -v` and tell me what it says.
Schedule it. On Linux add the cron line: `(crontab -l 2>/dev/null; echo '*/5 * * * * $HOME/.local/bin/needs-you-jira >/dev/null  # needs-you-jira') | crontab -`. On macOS use the LaunchAgent integrations/jira/io.needs-you.jira.plist from the repo instead (replace /Users/me with my home directory).
If a run prints an error, fix what it names, or tell me if it needs me.

Check it works #

Ask a teammate to comment on one of your issues (or comment from another account). Within 5 minutes a card "New comment on ACME-123: summary" appears on your Mac; Open goes straight to the comment. Reply in Jira, and the card goes on the next run, since you acted last.

needs-you-jira --dry-run -v shows what it would post right now without posting anything.

Tune it #

Settings go in ~/.config/needs-you/env:

NEEDS_YOU_JIRA_STATUSES=Blocked=urgent,In Review=normal,QA Failed=urgent,*=low   # which statuses matter, and how much
NEEDS_YOU_JIRA_PROJECTS=ACME=work:normal,OPS=work:urgent                         # only these projects; context and base priority
NEEDS_YOU_JIRA_EVENTS=-assigned                                                  # turn events off (status, comment, assigned, mention)
NEEDS_YOU_JIRA_JQL_EXTRA='labels != noise'                                       # narrow it further with JQL
NEEDS_YOU_JIRA_WATCHING=1                                                        # issues you watch count too

NEEDS_YOU_JIRA_JQL_EXTRA is added in parentheses with AND, so it can only narrow what you get, never widen it to other people's issues. It's refused if its quotes or parentheses don't balance or it has ORDER BY.

How loudly a card arrives is up to the Mac: each card carries what happened as its event (status, comment, assigned, mention), so an alert rule on the Mac can, say, make comments always wait for later, or one issue urgent while you're on it (Mac app).

The full list of cards, keys and settings is in integrations/jira/README.md. At most 20 cards are open at once (NEEDS_YOU_JIRA_MAX_CARDS).

When it doesn't post #

This page is docs/guides/jira.md in the repo. View or edit it on GitHub.