Sha256: e02b1e2a9e94b376f783dab946d68ba0b12f43c19ed755c96ee16247eabae3e6

Contents?: true

Size: 709 Bytes

Versions: 1

Compression:

Stored size: 709 Bytes

Contents

class AddTaskTrackedStatuses

  def self.up

    task_statuses = TrackedStatusType.create(internal_identifier: 'task_statuses', description: 'Task Statuses')

    [
        ['task_status_not_started', 'Not Started'],
        ['task_status_in_progress', 'In Progress'],
        ['task_status_complete', 'Complete'],
        ['task_status_hold', 'Hold'],
        ['task_status_canceled', 'Cancelled']
    ].each do |data|
      status = TrackedStatusType.create(internal_identifier: data[0], description: data[1])
      status.move_to_child_of(task_statuses)
    end

  end

  def self.down
    task_statuses = TrackedStatusType.find_by_internal_identifier('task_statuses')
    task_statuses.destroy
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
erp_work_effort-4.2.0 db/data_migrations/20150711220000_add_task_tracked_statuses.rb