Class: JIRA::Resource::IssuePickerSuggestions
- Defined in:
- lib/jira/resource/issue_picker_suggestions.rb
Constant Summary
Constants inherited from Base
Base::QUERY_PARAMS_FOR_SEARCH, Base::QUERY_PARAMS_FOR_SINGLE_FETCH
Instance Attribute Summary
Attributes inherited from Base
#attrs, #client, #deleted, #expanded
Class Method Summary collapse
Methods inherited from Base
belongs_to, belongs_to_relationships, build, collection_attributes_are_nested, collection_path, #collection_path, #delete, endpoint_name, #fetch, find, #has_errors?, has_many, has_one, #id, #initialize, key_attribute, #key_value, #method_missing, nested_collections, #new_record?, parse_json, #patched_url, #path_component, #respond_to?, #save, #save!, #set_attrs, #set_attrs_from_response, singular_path, #to_json, #to_s, #to_sym, #url
Constructor Details
This class inherits a constructor from JIRA::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class JIRA::Base
Class Method Details
.all(client, query = '', options = { current_jql: nil, current_issue_key: nil, current_project_id: nil, show_sub_tasks: nil, show_sub_tasks_parent: nil }) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/jira/resource/issue_picker_suggestions.rb', line 9 def self.all(client, query = '', = { current_jql: nil, current_issue_key: nil, current_project_id: nil, show_sub_tasks: nil, show_sub_tasks_parent: nil }) url = client.[:rest_base_path] + "/issue/picker?query=#{CGI.escape(query)}" url << "¤tJQL=#{CGI.escape([:current_jql])}" if [:current_jql] url << "¤tIssueKey=#{CGI.escape([:current_issue_key])}" if [:current_issue_key] url << "¤tProjectId=#{CGI.escape([:current_project_id])}" if [:current_project_id] url << "&showSubTasks=#{[:show_sub_tasks]}" if [:show_sub_tasks] url << "&showSubTaskParent=#{[:show_sub_task_parent]}" if [:show_sub_task_parent] response = client.get(url) json = parse_json(response.body) client.IssuePickerSuggestions.build(json) end |