Class: Jira::Command::Transition
- Defined in:
- lib/jira/commands/transition.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#ticket ⇒ Object
Returns the value of attribute ticket.
Instance Method Summary collapse
-
#initialize(ticket, options) ⇒ Transition
constructor
A new instance of Transition.
- #run ⇒ Object
Constructor Details
#initialize(ticket, options) ⇒ Transition
Returns a new instance of Transition.
18 19 20 21 |
# File 'lib/jira/commands/transition.rb', line 18 def initialize(ticket, ) self.ticket = ticket self. = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
16 17 18 |
# File 'lib/jira/commands/transition.rb', line 16 def @options end |
#ticket ⇒ Object
Returns the value of attribute ticket.
16 17 18 |
# File 'lib/jira/commands/transition.rb', line 16 def ticket @ticket end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/jira/commands/transition.rb', line 23 def run return if ticket.empty? return if .empty? return unless ['errorMessages'].nil? return if transition.nil? || transition.empty? api.post "issue/#{ticket}/transitions", params: params, success: on_success, failure: on_failure end |