Skip to content

fix(jira): Use enhanced_jql for Cloud searches and fix startAt TypeError #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 1, 2025

Conversation

sooperset
Copy link
Owner

Description

This PR fixes the TypeError: enhanced_jql() got an unexpected keyword argument 'start' error when using jira_search with startAt in Jira Cloud. The enhanced_jql method from atlassian-python-api doesn't support the start parameter.

Also updates atlassian-python-api dependency to version >=4.0.0.

Refs: #347

Changes

  • Added conditional logic in SearchMixin.search_issues to use different methods based on environment
  • Uses enhanced_jql without start parameter for Cloud environments
  • Continues using jql with start parameter for Server/DC environments
  • Updated parameter documentation to clarify startAt behavior in Cloud
  • Updated atlassian-python-api dependency to >=4.0.0

Testing

  • Unit tests added/updated
  • Integration tests passed
  • Manual checks performed: [Verified behavior in both Cloud and Server environments]

Checklist

  • Code follows project style guidelines (linting passes).
  • Tests added/updated for changes.
  • All tests pass locally.
  • Documentation updated (updated parameter documentation).

sooperset added 3 commits May 1, 2025 17:35
Modifies the `SearchMixin.search_issues` method to conditionally use
the appropriate Jira API method based on the instance type:
- For Jira Cloud (`config.is_cloud == True`), it now calls `enhanced_jql`,
  removing the unsupported `start` keyword argument.
- For Jira Server/DC (`config.is_cloud == False`), it continues to use
  the `jql` method with the `start` argument for pagination.

This resolves the `TypeError: enhanced_jql() got an unexpected keyword argument 'start'`
reported when searching issues on Jira Cloud with pagination parameters.

Note: As `enhanced_jql` does not support the `startAt` offset, pagination
using the `startAt` parameter in the `jira_search` tool will effectively
be ignored for Jira Cloud instances, always returning the first page.
This limitation is documented in the method's docstring.
@sooperset sooperset merged commit 00ad12a into main May 1, 2025
5 checks passed
@sooperset sooperset deleted the fix/issue-347-jira-cloud-search-pagination branch May 1, 2025 08:40
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