Class: Apadmi::Grout::MoveTicketsAction
- Inherits:
-
Object
- Object
- Apadmi::Grout::MoveTicketsAction
- Defined in:
- lib/apadmi/grout/actions/move_tickets_action.rb
Overview
Moves all given tickets to a given status and assigns fix versions
Instance Method Summary collapse
-
#initialize(board_service, logger) ⇒ MoveTicketsAction
constructor
A new instance of MoveTicketsAction.
- #run(version_strings, issues, new_status) ⇒ Object
Constructor Details
#initialize(board_service, logger) ⇒ MoveTicketsAction
Returns a new instance of MoveTicketsAction.
9 10 11 12 |
# File 'lib/apadmi/grout/actions/move_tickets_action.rb', line 9 def initialize(board_service, logger) @board_service = board_service @logger = logger end |
Instance Method Details
#run(version_strings, issues, new_status) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/apadmi/grout/actions/move_tickets_action.rb', line 17 def run(version_strings, issues, new_status) if issues.empty? @logger.error("No issues found, aborting") return end @logger.("Transitioning issues: #{issues.map(&:key).join(", ")}") issues.each do |issue| @board_service.transition_issue(issue, new_status) @board_service.assign_fixversions(issue.key, version_strings) end @logger.success("Issues transitioned successfully :D") end |