Class: JiraIssues::JiraWorkflow

Inherits:
Object
  • Object
show all
Defined in:
lib/jira_issues/jira_workflow.rb

Constant Summary collapse

OPEN =
'Open'
IN_PROGRESS =
'InProgress'
BLOCKED =
'Blocked'
CLOSED =
'Closed'

Class Method Summary collapse

Class Method Details

.issue_status_for_name(project_key, status_name) ⇒ Object

This is WIP This class should be able to map and unify:

- statuses
- workflows
- transitions

ATM - we will work onlu on defailt issue names



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/jira_issues/jira_workflow.rb', line 15

def self.issue_status_for_name(project_key, status_name)
  {
    'Backlog'       => OPEN,
    'Open'          => OPEN,
    'To Do'         => OPEN,
    'Blocked'       => BLOCKED,
    'In Progress'   => IN_PROGRESS,
    'Specification' => IN_PROGRESS,
    'Done'          => CLOSED,
    'Closed'        => CLOSED,
    'Resolved'      => CLOSED,
    'Awaiting QA Deploy' => CLOSED,
    'Awaiting Copy' => OPEN,
    'Awaiting Design' => OPEN,
    'Design In Progress' => OPEN
  }.fetch(status_name)
rescue KeyError => e
  p "You have issue with custom - if you want mapping to be configurable please contact me #{Gem.loaded_specs["jira_issues"]..fetch('source_code_uri')}"
  raise e
end