Skip to content

Commit 10cafc5

Browse files
committed
update docstrings
1 parent 8fec880 commit 10cafc5

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

atlassian/jira.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3966,12 +3966,12 @@ def get_priority_by_id(self, priority_id: T_id) -> T_resp_json:
39663966

39673967
def get_autocomplete_data(self) -> T_resp_json:
39683968
"""
3969-
Returns full information about visible fields that can be used in JQL.
3969+
Returns full information about visible fields that can be autocompleted in JQL.
39703970
39713971
Available in Jira Data Center, Jira Cloud v2, Jira Cloud v3.
39723972
3973-
Reference: https://developer.atlassian.com/server/jira/platform/rest/v11003/api-group-jql/#api-group-jql
3974-
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-group-jql
3973+
Reference: https://developer.atlassian.com/server/jira/platform/rest/v11003/api-group-jql/#api-api-2-jql-autocompletedata-get
3974+
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-rest-api-2-jql-autocompletedata-get
39753975
:return:
39763976
"""
39773977
url = self.resource_url("jql/autocompletedata")
@@ -3994,6 +3994,12 @@ def get_autocomplete_suggestion(
39943994
`fieldName` and `predicateName` to get a list of all predicate values for the field.
39953995
`fieldName`, `predicateName`, and `predicateValue` to get a list of predicate values containing the text in `predicateValue`.
39963996
3997+
Although auto complete suggestion can be used to retrieve possible option for a field,
3998+
it may be more appropriate to use `get_custom_field_options()` method to get project-specific options for a field.
3999+
4000+
Reference: https://developer.atlassian.com/server/jira/platform/rest/v11003/api-group-jql/#api-api-2-jql-autocompletedata-suggestions-get
4001+
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-rest-api-2-jql-autocompletedata-suggestions-get
4002+
39974003
:param field_name: str, Optional - The field name for which the suggestions are generated.
39984004
:param field_value: str, Optional - The portion of the field value that has already been provided by the user.
39994005
:param predicate_name: str, Optional - The predicate for which the suggestions are generated. Suggestions are generated only for: "by", "from" and "to".

docs/jira.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,13 @@ Epic Issues
467467
# By default, the returned issues are ordered by rank.
468468
jira.get_issues_for_epic(board_id, epic_id, jql="", validate_query="", fields="*all", expand="", start=0, limit=50, )
469469
470+
# Returns full information about visible fields that can be autocompleted in JQL.
471+
jira.get_autocomplete_data()
472+
473+
# Returns auto complete suggestions for JQL search.
474+
field_name = "Custom Field"
475+
jira.get_autocomplete_suggestion(field_name, field_value=None, predicate_name=None, predicate_value=None)
476+
470477
Manage Boards
471478
-------------
472479

0 commit comments

Comments
 (0)