Module: Speedflow::Plugin::Jira::Formatter::IssueFormatter

Defined in:
lib/speedflow/plugin/jira/formatter/issue_formatter.rb

Overview

Issue formatter

Class Method Summary collapse

Class Method Details

.to_assignee(assignee_name) ⇒ Object

Public: To assignee.

assignee_name - Assignee name.

Returns Hash of fields.



30
31
32
33
34
35
36
37
38
# File 'lib/speedflow/plugin/jira/formatter/issue_formatter.rb', line 30

def self.to_assignee(assignee_name)
  {
    'fields' => {
      'assignee' => {
        'name' => assignee_name.to_s
      }
    }
  }
end

.to_create(project_key, title, issue_type_id) ⇒ Object

Public: To create issue.

project_key - Project Key. title - Issue title. issue_type_id - Issue type ID.

Returns Hash of fields.



15
16
17
18
19
20
21
22
23
# File 'lib/speedflow/plugin/jira/formatter/issue_formatter.rb', line 15

def self.to_create(project_key, title, issue_type_id)
  {
    'fields' => {
      'project'   => { 'key' => project_key.to_s },
      'summary'   => title.to_s,
      'issuetype' => { 'id' => issue_type_id.to_s }
    }
  }
end