-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
Add enhanced_search_issues API for Jira Cloud using new search/jql endpoint #2326
Add enhanced_search_issues API for Jira Cloud using new search/jql endpoint #2326
Conversation
Introduce a new function enhanced_search_issues that calls the new search/jql REST endpoint, replacing the deprecated search API for Jira Cloud. This update leverages nextPageToken-based pagination for improved performance and prepares the library for the removal of the old endpoints (GET/POST /rest/api/3/search) effective May 1, 2025. BREAKING CHANGE: Jira Cloud users should migrate to enhanced_search_issues as the old search_issues endpoint is deprecated.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Hey @skumar36-atlassian , thank you for your work!! I'm not a maintainer of this repo but it seems a label is missing on this PR, preventing a check from passing. Could you add one? Options are bug, enhancement, major, minor, patch, skip-changelog. |
@wblondel, ⭐3 XP earned, 🏆First Comment Added completed! |
/label enhancement |
Yes, I have tried to add /label enhancement as a comment and update the title with enhancement: keyword, also I am not seeing any option to update it to enhancement. @ssbarnea can you help here? |
@jeffgeorge , @wblondel ,@adehad, @ssbarnea any updates? |
I cannot do anything, I am not a maintainer. |
Heyhey, I'll have a look this evening... Let's see if we can get this on the main line. |
@studioj, ⭐3 XP earned, 🏆First Comment Added completed, 💪Level 3 achieved! |
@studioj, ⭐3 XP earned, 🏆First Code Review Done completed, 💪Level 3 achieved! |
Pull Request Summary by devActivityMetricsAchievements
|
Overview
This PR introduces two new functions for Jira Cloud:
enhanced_search_issues
search/jql
REST endpoint withnextPageToken
-based pagination.GET/POST /rest/api/3/search
).maxResults
is set toFalse
).approximate_issue_count
search/approximate-count
API to retrieve an approximate count of issues matching a given JQL query.json_result
flag.Changes
enhanced_search_issues
✅ Implements
nextPageToken
-based pagination.✅ Fetches all results if
maxResults
evaluates toFalse
; otherwise, it fetches up to the specified limit.approximate_issue_count
✅ Retrieves an approximate count of issues for a given JQL query.
✅ Returns either an integer count or the full JSON response.
💡 Both functions are decorated with
@cloud_api
to ensure they are only used on Jira Cloud.🔹 Jira Cloud users will use these new APIs.
🔹 Jira Server/Data Center users remain unaffected and will continue using the existing APIs.
Deprecation Fix: Explicit Sphinx Configuration
Testing & Limitations
Manual Testing
✔️ Validated against a Jira Cloud instance.
Unit Tests
🔹 Further work is needed to establish a dedicated Jira Cloud test setup.
Migration & Impact
🚨 Breaking Change
enhanced_search_issues
andapproximate_issue_count
to ensure continued compatibility.Additional Context
Please review the changes and let me know if any further modifications are required. 🚀