Skip to content
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

patch for search issues by key using JIRA issuePicker rest API. #3

Merged
merged 1 commit into from Oct 6, 2016

Conversation

@ankushmiddha
Copy link

@ankushmiddha ankushmiddha commented Oct 6, 2016

Added search_for_issue_by_key method in forked JIRA class

Added search_for_issue_by_key method in forked JIRA class
@ankushmiddha ankushmiddha force-pushed the ankushmiddha:patch-search-issue branch from 730f686 to 8067993 Oct 6, 2016
@ankushmiddha
Copy link
Author

@ankushmiddha ankushmiddha commented Oct 6, 2016

@duttly @sirsgriffin @tgrrtt

Added method in forked version JIRA class. Follow up PR of loggly/fronted (https://github.com/loggly/frontend/pull/6836)
Please review.

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getIssuePickerResource
'''
JIRA_API_ISSUE_SEARCH = "/rest/api/2/issue/picker" \
"?showSubTasks=true&showSubTaskParent=true&currentJQL=&query="

This comment has been minimized.

@tgrrtt

tgrrtt Oct 6, 2016

All of these querystrings should be parameterized.

This comment has been minimized.

@duttly

duttly Oct 6, 2016

@tgrrtt There is no current plan to tweak the parameters, or expose them in some form. Keeping it simple for now.

JIRA_API_ISSUE_SEARCH = "/rest/api/2/issue/picker" \
"?showSubTasks=true&showSubTaskParent=true&currentJQL=&query="
search_url = "{}{}{}".format(self._options["server"], JIRA_API_ISSUE_SEARCH, search_key)
search_result = self._session.get(search_url)

This comment has been minimized.

@sirsgriffin

sirsgriffin Oct 6, 2016

Shouldn't this attempt adhere to the current convention in this module of using self._fetch_pages()?

This comment has been minimized.

@tgrrtt

tgrrtt Oct 6, 2016

I think the other search functions take pagination params.

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getIssuePickerResource
Doesn't seem to be paginated

This comment has been minimized.

@tgrrtt

tgrrtt Oct 6, 2016

As it's not an actual "search"

This comment has been minimized.

@duttly

duttly Oct 6, 2016

Correct, no pagination. It returns N results (divided in 2 sections), we have no control of N or the split.

@duttly duttly merged commit 3ee04a6 into loggly:develop Oct 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.