Class: Dude::ProjectManagement::Jira::MoveTaskToList
- Inherits:
-
Object
- Object
- Dude::ProjectManagement::Jira::MoveTaskToList
- Defined in:
- lib/dude/project_management/jira/move_task_to_list.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(client, id:, list_name:) ⇒ MoveTaskToList
constructor
A new instance of MoveTaskToList.
Constructor Details
#initialize(client, id:, list_name:) ⇒ MoveTaskToList
Returns a new instance of MoveTaskToList.
7 8 9 10 11 |
# File 'lib/dude/project_management/jira/move_task_to_list.rb', line 7 def initialize(client, id:, list_name:) @client = client @id = id @list_name = list_name end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dude/project_management/jira/move_task_to_list.rb', line 13 def call issue = client.Issue.find(id) available_transitions = client.Transition.all(issue: issue) transition_id = generate_transition_id(issue, available_transitions) transition = issue.transitions.build transition.save!(transition: { id: transition_id }) end |