Class: Jira::Command::Link
Instance Attribute Summary collapse
-
#ticket ⇒ Object
Returns the value of attribute ticket.
Instance Method Summary collapse
-
#initialize(ticket) ⇒ Link
constructor
A new instance of Link.
- #run ⇒ Object
Constructor Details
#initialize(ticket) ⇒ Link
Returns a new instance of Link.
16 17 18 |
# File 'lib/jira/commands/link.rb', line 16 def initialize(ticket) self.ticket = ticket end |
Instance Attribute Details
#ticket ⇒ Object
Returns the value of attribute ticket.
14 15 16 |
# File 'lib/jira/commands/link.rb', line 14 def ticket @ticket end |
Instance Method Details
#run ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/jira/commands/link.rb', line 20 def run return if ticket.empty? return if .empty? return if issue_link_type.empty? return if outward_ticket.empty? return unless invalid_ticket? begin api.post "issueLink", params: params, success: on_success, failure: on_failure rescue CommandException end end |