Class: JiraIssues::JiraQuery
- Inherits:
-
Object
- Object
- JiraIssues::JiraQuery
- Defined in:
- lib/jira_issues/jira_query.rb
Instance Method Summary collapse
-
#initialize(max_results = 1000) ⇒ JiraQuery
constructor
Creates new Query object and sets the maximum number of issues returned by Query.
-
#jql_query(query) ⇒ JiraIssueNavigator
Handles a JQL Request and returns JiraIssueavigator for that query.
Constructor Details
#initialize(max_results = 1000) ⇒ JiraQuery
Creates new Query object and sets the maximum number of issues returned by Query
7 8 9 |
# File 'lib/jira_issues/jira_query.rb', line 7 def initialize(max_results = 1000) @query_max_results = max_results end |
Instance Method Details
#jql_query(query) ⇒ JiraIssueNavigator
Handles a JQL Request and returns JiraIssueavigator for that query
14 15 16 17 |
# File 'lib/jira_issues/jira_query.rb', line 14 def jql_query(query) result = adapter.jql(query, fields:[:description, :summary, :created, :status, :issuetype, :priority, :resolutiondate, :duedate], max_results: @query_max_results) JiraIssuesNavigator.new(result.map { |i| JiraIssueMapper.new.call(i) }) end |