Skip to content

feat(jira): add getActiveIssue command to expose active issue key to other extensions#1780

Open
OutOfBears wants to merge 2 commits intoatlassian:mainfrom
paradoxum-games:main
Open

feat(jira): add getActiveIssue command to expose active issue key to other extensions#1780
OutOfBears wants to merge 2 commits intoatlassian:mainfrom
paradoxum-games:main

Conversation

@OutOfBears
Copy link
Copy Markdown

@OutOfBears OutOfBears commented Apr 14, 2026

What Is This Change?

Adds a new VS Code command atlascode.jira.getActiveIssue that returns the key of the currently active Jira issue displayed in the status bar.

This allows other VS Code extensions and tasks (e.g., git commit hooks, custom task runners, or companion extensions) to programmatically retrieve the active Jira issue key without scraping the UI. The command is registered in the JiraActiveIssueStatusBar and simply returns this.activeIssue?.key, so it's lightweight and has no side effects.

Changes across 5 files:

  • package.json — Registers the new atlascode.jira.getActiveIssue command under the "Jira" category.
  • src/constants.ts — Adds the JiraGetActiveIssue entry to the Commands enum.
  • src/views/jira/activeIssueStatusBar.ts — Imports the new command constant and registers a handler via commands.registerCommand that returns the active issue's key (or undefined if none is set).
  • src/views/jira/activeIssueStatusBar.test.ts — Adds a test verifying the command is registered and returns the expected issue key.
  • CHANGELOG.md — Documents the new command in the Unreleased section.

How Has This Been Tested?

  • Added a unit test in activeIssueStatusBar.test.ts that confirms the command is registered and returns the correct issue key ('TEST-123') when an active issue is present.
  • The implementation is a single-line return from an already-maintained property (this.activeIssue?.key), so risk of regression is minimal.

Basic checks:

  • npm run lint
  • npm run test

Advanced checks:

Recommendations:

  • Update the CHANGELOG if making a user facing change

Rovo Dev code review: Rovo Dev couldn't review this pull request
The pull request author does not have access to Rovo Dev.

…ension-to-expose-active-task

Expose active Jira issue key via `atlascode.jira.getActiveIssue` command
@atlassian-cla-bot
Copy link
Copy Markdown

Thank you for your submission! Like many open source projects, we ask that you sign our CLA (Contributor License Agreement) before we can accept your contribution.
If your email is listed below, please ensure that you sign the CLA with the same email address.

The following users still need to sign our CLA:
❌OutOfBears

Already signed the CLA? To re-check, try refreshing the page.

@atlassian
Copy link
Copy Markdown
Contributor

atlassian bot commented Apr 14, 2026

To enable Rovo Dev code reviews, link your GitHub account to your Atlassian account.

This is a one-time task that takes less than a minute. Once your account is linked, resubmit the pull request to trigger a code review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant