Module: QTimetrap::Services::TimetrapGatewayUpdateTaskHelpers
- Included in:
- TimetrapGateway
- Defined in:
- app/services/timetrap_gateway_update_task_helpers.rb
Overview
Task/sheet move workflow for Timetrap API/CLI adapters.
Instance Method Summary collapse
Instance Method Details
#update_task(entry_id, sheet) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/services/timetrap_gateway_update_task_helpers.rb', line 7 def update_task(entry_id, sheet) normalized_id = entry_id.to_i normalized_sheet = normalize_text(sheet).strip return if normalized_id.zero? validate_target_sheet!(normalized_sheet) return update_task_via_api_logged(normalized_id, normalized_sheet) if api_available? update_task_via_cli(normalized_id, normalized_sheet) end |