Skip to content

fix(bitbucket): use documented Jira issue key field - #1727

Merged
potiuk merged 1 commit into
apache:mainfrom
KatalKavya96:fix-bitbucket-jira-documented-key
Oct 20, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
KatalKavya96:fix-bitbucket-jira-documented-key

Conversation

@KatalKavya96

Copy link
Copy Markdown
Contributor

Summary

  • Removes the undocumented issueKey fallback from Bitbucket Data Center Jira issue normalization.
  • Uses the documented key field from the Jira integration response.
  • Keeps whitespace trimming, uppercase normalization, and deduplication.
  • Adds regression coverage confirming an issueKey-only object is ignored.

Type of change

  • Skill change (.claude/skills/<name>/)
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators`)
  • Other

Test plan

  • uv run --group dev ruff check src tests --fix
  • uv run --group dev ruff format src tests
  • uv run --group dev mypy src tests
  • Focused Jira-issue tests pass
  • Full tools/bitbucket/tests/test_bitbucket.py suite passes
  • git diff --check passes
  • prek run --all-files passes

Context

Follow-up to #1687.

During review of #1687, it was noted that Bitbucket Data Center's documented Jira integration response exposes Jira issue identifiers through key, while the normalizer also accepted an undocumented issueKey fallback.

We did not observe issueKey from a real Data Center response, so this follow-up removes that speculative fallback and keeps the normalization aligned with the documented response shape.

Refs #606

@github-actions github-actions Bot added family:tools tools/* contract:tracker Tool capability: issue / board / label backend contract:change-request Tool capability: proposed-change review + merge gate (PR / MR / Gerrit change) labels Oct 20, 2026
@KatalKavya96

KatalKavya96 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

@potiuk, Follow-up to #1687.

This removes the speculative issueKey fallback from the Bitbucket Data Center Jira issue normalizer and keeps only the documented key field.

I also updated the regression test to verify that:

  • key values are still trimmed, uppercased, and deduplicated.
  • an issueKey-only object is ignored.

All focused Jira-handoff tests, the full Bitbucket test suite, lint, formatting, mypy, and prek run --all-files pass.

Refs #606

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removes the issueKey fallback from pull_request_jira_issues, so only the key field that Data Center's Jira-integration endpoint documents (alongside url) is read. This answers the open question from #1687.

The new {"issueKey": "MAGPIE-999"} fixture fails against the pre-change normalize.py (MAGPIE-999 leaks into jira_issue_keys), so the test really guards the change, not just the happy path.
Trimming, uppercasing and dedup are unchanged, and the full Bitbucket suite passes on the head.
Thanks!


This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.

More on how Apache Magpie handles maintainer review:
Contributing guide.

@potiuk
potiuk merged commit 2a5537d into apache:main Oct 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contract:change-request Tool capability: proposed-change review + merge gate (PR / MR / Gerrit change) contract:tracker Tool capability: issue / board / label backend family:tools tools/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants