Class: Dude::ProjectManagement::Jira::FetchCurrentTask

Inherits:
Object
  • Object
show all
Defined in:
lib/dude/project_management/jira/fetch_current_task.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, id:) ⇒ FetchCurrentTask

Returns a new instance of FetchCurrentTask.



9
10
11
12
# File 'lib/dude/project_management/jira/fetch_current_task.rb', line 9

def initialize(client, id:)
  @client = client
  @id = id
end

Instance Method Details

#callObject



14
15
16
17
18
# File 'lib/dude/project_management/jira/fetch_current_task.rb', line 14

def call
  create_issue(client.Issue.find(id))
rescue JIRA::HTTPError
  puts "#{'Error:'.red.bold} Task #{id.bold} not found. Try again with correct task ID"
end