fix(jira): replace fragile key/username heuristic in Server/DC user lookup#999
Merged
Conversation
…ookup The heuristic `"-" in resolved and any(c.isdigit() for c in resolved)` misclassifies usernames like `j-smith2` as Jira keys. Replace it with `_resolve_server_dc_user_params()` which preserves whether the search API returned a `name` or `key` field, eliminating the guesswork. For non-email identifiers, use `username=` as the safe default since Jira Server/DC 7.x+ resolves both usernames and keys via this param. Github-Issue:#998
sooperset
added a commit
that referenced
this pull request
Feb 25, 2026
Cover new tools and bugfixes from PRs #991, #992, #994, #999, #1001: - Image tools: jira_get_issue_images, confluence_get_page_images (DC+Cloud) - ac:image → markdown conversion verification - ADF write round-trip (Cloud only): bold, italic, lists, code, headings, links - DC user email→username resolution and assignment Extends DC conftest with admin_email, image upload helpers, and module-scoped fixtures. Extends Cloud conftest with same pattern.
3 tasks
sooperset
added a commit
that referenced
this pull request
Feb 25, 2026
* test(e2e): add 24 E2E tests for v0.18.0 features Cover new tools and bugfixes from PRs #991, #992, #994, #999, #1001: - Image tools: jira_get_issue_images, confluence_get_page_images (DC+Cloud) - ac:image → markdown conversion verification - ADF write round-trip (Cloud only): bold, italic, lists, code, headings, links - DC user email→username resolution and assignment Extends DC conftest with admin_email, image upload helpers, and module-scoped fixtures. Extends Cloud conftest with same pattern. * refactor(test): remove dead _cleanup_*_keys fields from E2E conftest dataclasses The _cleanup_issue_keys and _cleanup_page_ids fields on DCInstanceInfo and CloudInstanceInfo were appended to but never read. Cleanup is handled by module-scoped fixture teardown, making these lists dead code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #998. Replaces the fragile key/username heuristic that misclassifies usernames like
j-smith2as Jira keys._resolve_server_dc_user_params()that preserves whether the search API returned anameorkeyfield, returning the correct API param dict directly"-" in resolved and any(c.isdigit() for c in resolved)heuristic from both the email-resolution and direct-identifier pathsusername=as the safe default (works on Jira Server/DC 7.x+)name/keyvalues with truthiness checksTest plan
_resolve_server_dc_user_params(username, key, no match, empty name, error)username=Mintlify
0 threads from 0 users in Mintlify