Class: JiraIssues::JiraIssuesNavigator
- Inherits:
-
Object
- Object
- JiraIssues::JiraIssuesNavigator
show all
- Includes:
- JiraIssueStats
- Defined in:
- lib/jira_issues/jira_issues_navigator.rb
Instance Method Summary
collapse
#closed_by_week, #created_by_week
Constructor Details
Returns a new instance of JiraIssuesNavigator.
5
6
7
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 5
def initialize(issues)
@issues = issues
end
|
Instance Method Details
#all ⇒ Object
20
21
22
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 20
def all
JiraIssuesNavigator.new @issues
end
|
#blocked ⇒ Object
28
29
30
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 28
def blocked
JiraIssuesNavigator.new @issues.select {|i| i[:filter_status] == JiraWorkflow::BLOCKED}
end
|
#closed ⇒ Object
36
37
38
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 36
def closed
JiraIssuesNavigator.new @issues.select {|i| i[:filter_status] == JiraWorkflow::CLOSED}
end
|
#done ⇒ Object
49
50
51
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 49
def done
closed
end
|
#in_progress ⇒ Object
32
33
34
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 32
def in_progress
JiraIssuesNavigator.new @issues.select {|i| i[:filter_status] == JiraWorkflow::IN_PROGRESS}
end
|
#ip ⇒ Object
53
54
55
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 53
def ip
in_progress
end
|
#issues ⇒ Object
9
10
11
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 9
def issues
@issues
end
|
#open ⇒ Object
24
25
26
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 24
def open
JiraIssuesNavigator.new @issues.select {|i| i[:filter_status] == JiraWorkflow::OPEN}
end
|
#to_json ⇒ Object
13
14
15
16
17
18
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 13
def to_json
json = []
@issues.each do |i|
json << i.to_json
end
end
|
#todo ⇒ Object
45
46
47
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 45
def todo
open
end
|
#with_status(status: selected_status) ⇒ Object
40
41
42
|
# File 'lib/jira_issues/jira_issues_navigator.rb', line 40
def with_status(status: selected_status)
JiraIssuesNavigator.new @issues.select {|i| i[:filter_status] == @issue_states[selected_status]}
end
|