Class: MPXJ::Task

Inherits:
Container show all
Includes:
TaskMethods
Defined in:
lib/mpxj/task.rb

Overview

Represents a task in a project plan

Constant Summary

Constants included from TaskMethods

MPXJ::TaskMethods::ATTRIBUTE_TYPES

Instance Attribute Summary collapse

Attributes inherited from Container

#attribute_values, #parent_project

Instance Method Summary collapse

Methods included from TaskMethods

#active, #activity_codes, #activity_id, #activity_status, #activity_type, #actual_cost, #actual_duration, #actual_duration_units, #actual_finish, #actual_overtime_cost, #actual_overtime_work, #actual_overtime_work_protected, #actual_start, #actual_work, #actual_work_protected, #acwp, #assignment, #assignment_delay, #assignment_owner, #assignment_units, #attribute_types, #bar_name, #baseline10_budget_cost, #baseline10_budget_work, #baseline10_cost, #baseline10_deliverable_finish, #baseline10_deliverable_start, #baseline10_duration, #baseline10_duration_estimated, #baseline10_duration_units, #baseline10_estimated_duration, #baseline10_estimated_finish, #baseline10_estimated_start, #baseline10_finish, #baseline10_fixed_cost, #baseline10_fixed_cost_accrual, #baseline10_start, #baseline10_work, #baseline1_budget_cost, #baseline1_budget_work, #baseline1_cost, #baseline1_deliverable_finish, #baseline1_deliverable_start, #baseline1_duration, #baseline1_duration_estimated, #baseline1_duration_units, #baseline1_estimated_duration, #baseline1_estimated_finish, #baseline1_estimated_start, #baseline1_finish, #baseline1_fixed_cost, #baseline1_fixed_cost_accrual, #baseline1_start, #baseline1_work, #baseline2_budget_cost, #baseline2_budget_work, #baseline2_cost, #baseline2_deliverable_finish, #baseline2_deliverable_start, #baseline2_duration, #baseline2_duration_estimated, #baseline2_duration_units, #baseline2_estimated_duration, #baseline2_estimated_finish, #baseline2_estimated_start, #baseline2_finish, #baseline2_fixed_cost, #baseline2_fixed_cost_accrual, #baseline2_start, #baseline2_work, #baseline3_budget_cost, #baseline3_budget_work, #baseline3_cost, #baseline3_deliverable_finish, #baseline3_deliverable_start, #baseline3_duration, #baseline3_duration_estimated, #baseline3_duration_units, #baseline3_estimated_duration, #baseline3_estimated_finish, #baseline3_estimated_start, #baseline3_finish, #baseline3_fixed_cost, #baseline3_fixed_cost_accrual, #baseline3_start, #baseline3_work, #baseline4_budget_cost, #baseline4_budget_work, #baseline4_cost, #baseline4_deliverable_finish, #baseline4_deliverable_start, #baseline4_duration, #baseline4_duration_estimated, #baseline4_duration_units, #baseline4_estimated_duration, #baseline4_estimated_finish, #baseline4_estimated_start, #baseline4_finish, #baseline4_fixed_cost, #baseline4_fixed_cost_accrual, #baseline4_start, #baseline4_work, #baseline5_budget_cost, #baseline5_budget_work, #baseline5_cost, #baseline5_deliverable_finish, #baseline5_deliverable_start, #baseline5_duration, #baseline5_duration_estimated, #baseline5_duration_units, #baseline5_estimated_duration, #baseline5_estimated_finish, #baseline5_estimated_start, #baseline5_finish, #baseline5_fixed_cost, #baseline5_fixed_cost_accrual, #baseline5_start, #baseline5_work, #baseline6_budget_cost, #baseline6_budget_work, #baseline6_cost, #baseline6_deliverable_finish, #baseline6_deliverable_start, #baseline6_duration, #baseline6_duration_estimated, #baseline6_duration_units, #baseline6_estimated_duration, #baseline6_estimated_finish, #baseline6_estimated_start, #baseline6_finish, #baseline6_fixed_cost, #baseline6_fixed_cost_accrual, #baseline6_start, #baseline6_work, #baseline7_budget_cost, #baseline7_budget_work, #baseline7_cost, #baseline7_deliverable_finish, #baseline7_deliverable_start, #baseline7_duration, #baseline7_duration_estimated, #baseline7_duration_units, #baseline7_estimated_duration, #baseline7_estimated_finish, #baseline7_estimated_start, #baseline7_finish, #baseline7_fixed_cost, #baseline7_fixed_cost_accrual, #baseline7_start, #baseline7_work, #baseline8_budget_cost, #baseline8_budget_work, #baseline8_cost, #baseline8_deliverable_finish, #baseline8_deliverable_start, #baseline8_duration, #baseline8_duration_estimated, #baseline8_duration_units, #baseline8_estimated_duration, #baseline8_estimated_finish, #baseline8_estimated_start, #baseline8_finish, #baseline8_fixed_cost, #baseline8_fixed_cost_accrual, #baseline8_start, #baseline8_work, #baseline9_budget_cost, #baseline9_budget_work, #baseline9_cost, #baseline9_deliverable_finish, #baseline9_deliverable_start, #baseline9_duration, #baseline9_duration_estimated, #baseline9_duration_units, #baseline9_estimated_duration, #baseline9_estimated_finish, #baseline9_estimated_start, #baseline9_finish, #baseline9_fixed_cost, #baseline9_fixed_cost_accrual, #baseline9_start, #baseline9_work, #baseline_budget_cost, #baseline_budget_work, #baseline_cost, #baseline_deliverable_finish, #baseline_deliverable_start, #baseline_duration, #baseline_duration_estimated, #baseline_duration_units, #baseline_estimated_duration, #baseline_estimated_finish, #baseline_estimated_start, #baseline_finish, #baseline_fixed_cost, #baseline_fixed_cost_accrual, #baseline_start, #baseline_work, #bcwp, #bcws, #bid_item, #board_status, #board_status_id, #budget_cost, #budget_work, #calendar_unique_id, #category_of_work, #complete_through, #confirmed, #constraint_date, #constraint_type, #contact, #cost, #cost1, #cost10, #cost2, #cost3, #cost4, #cost5, #cost6, #cost7, #cost8, #cost9, #cost_rate_table, #cost_variance, #cpi, #created, #critical, #cv, #cvpercent, #date1, #date10, #date2, #date3, #date4, #date5, #date6, #date7, #date8, #date9, #deadline, #deliverable_finish, #deliverable_guid, #deliverable_name, #deliverable_start, #deliverable_type, #department, #duration, #duration1, #duration10, #duration10_estimated, #duration10_units, #duration1_estimated, #duration1_units, #duration2, #duration2_estimated, #duration2_units, #duration3, #duration3_estimated, #duration3_units, #duration4, #duration4_estimated, #duration4_units, #duration5, #duration5_estimated, #duration5_units, #duration6, #duration6_estimated, #duration6_units, #duration7, #duration7_estimated, #duration7_units, #duration8, #duration8_estimated, #duration8_units, #duration9, #duration9_estimated, #duration9_units, #duration_text, #duration_units, #duration_variance, #eac, #early_finish, #early_start, #earned_value_method, #effort_driven, #enterprise_cost1, #enterprise_cost10, #enterprise_cost2, #enterprise_cost3, #enterprise_cost4, #enterprise_cost5, #enterprise_cost6, #enterprise_cost7, #enterprise_cost8, #enterprise_cost9, #enterprise_data, #enterprise_date1, #enterprise_date10, #enterprise_date11, #enterprise_date12, #enterprise_date13, #enterprise_date14, #enterprise_date15, #enterprise_date16, #enterprise_date17, #enterprise_date18, #enterprise_date19, #enterprise_date2, #enterprise_date20, #enterprise_date21, #enterprise_date22, #enterprise_date23, #enterprise_date24, #enterprise_date25, #enterprise_date26, #enterprise_date27, #enterprise_date28, #enterprise_date29, #enterprise_date3, #enterprise_date30, #enterprise_date4, #enterprise_date5, #enterprise_date6, #enterprise_date7, #enterprise_date8, #enterprise_date9, #enterprise_duration1, #enterprise_duration10, #enterprise_duration10_units, #enterprise_duration1_units, #enterprise_duration2, #enterprise_duration2_units, #enterprise_duration3, #enterprise_duration3_units, #enterprise_duration4, #enterprise_duration4_units, #enterprise_duration5, #enterprise_duration5_units, #enterprise_duration6, #enterprise_duration6_units, #enterprise_duration7, #enterprise_duration7_units, #enterprise_duration8, #enterprise_duration8_units, #enterprise_duration9, #enterprise_duration9_units, #enterprise_flag1, #enterprise_flag10, #enterprise_flag11, #enterprise_flag12, #enterprise_flag13, #enterprise_flag14, #enterprise_flag15, #enterprise_flag16, #enterprise_flag17, #enterprise_flag18, #enterprise_flag19, #enterprise_flag2, #enterprise_flag20, #enterprise_flag3, #enterprise_flag4, #enterprise_flag5, #enterprise_flag6, #enterprise_flag7, #enterprise_flag8, #enterprise_flag9, #enterprise_number1, #enterprise_number10, #enterprise_number11, #enterprise_number12, #enterprise_number13, #enterprise_number14, #enterprise_number15, #enterprise_number16, #enterprise_number17, #enterprise_number18, #enterprise_number19, #enterprise_number2, #enterprise_number20, #enterprise_number21, #enterprise_number22, #enterprise_number23, #enterprise_number24, #enterprise_number25, #enterprise_number26, #enterprise_number27, #enterprise_number28, #enterprise_number29, #enterprise_number3, #enterprise_number30, #enterprise_number31, #enterprise_number32, #enterprise_number33, #enterprise_number34, #enterprise_number35, #enterprise_number36, #enterprise_number37, #enterprise_number38, #enterprise_number39, #enterprise_number4, #enterprise_number40, #enterprise_number5, #enterprise_number6, #enterprise_number7, #enterprise_number8, #enterprise_number9, #enterprise_outline_code1, #enterprise_outline_code10, #enterprise_outline_code11, #enterprise_outline_code12, #enterprise_outline_code13, #enterprise_outline_code14, #enterprise_outline_code15, #enterprise_outline_code16, #enterprise_outline_code17, #enterprise_outline_code18, #enterprise_outline_code19, #enterprise_outline_code2, #enterprise_outline_code20, #enterprise_outline_code21, #enterprise_outline_code22, #enterprise_outline_code23, #enterprise_outline_code24, #enterprise_outline_code25, #enterprise_outline_code26, #enterprise_outline_code27, #enterprise_outline_code28, #enterprise_outline_code29, #enterprise_outline_code3, #enterprise_outline_code30, #enterprise_outline_code4, #enterprise_outline_code5, #enterprise_outline_code6, #enterprise_outline_code7, #enterprise_outline_code8, #enterprise_outline_code9, #enterprise_project_cost1, #enterprise_project_cost10, #enterprise_project_cost2, #enterprise_project_cost3, #enterprise_project_cost4, #enterprise_project_cost5, #enterprise_project_cost6, #enterprise_project_cost7, #enterprise_project_cost8, #enterprise_project_cost9, #enterprise_project_date1, #enterprise_project_date10, #enterprise_project_date11, #enterprise_project_date12, #enterprise_project_date13, #enterprise_project_date14, #enterprise_project_date15, #enterprise_project_date16, #enterprise_project_date17, #enterprise_project_date18, #enterprise_project_date19, #enterprise_project_date2, #enterprise_project_date20, #enterprise_project_date21, #enterprise_project_date22, #enterprise_project_date23, #enterprise_project_date24, #enterprise_project_date25, #enterprise_project_date26, #enterprise_project_date27, #enterprise_project_date28, #enterprise_project_date29, #enterprise_project_date3, #enterprise_project_date30, #enterprise_project_date4, #enterprise_project_date5, #enterprise_project_date6, #enterprise_project_date7, #enterprise_project_date8, #enterprise_project_date9, #enterprise_project_duration1, #enterprise_project_duration10, #enterprise_project_duration2, #enterprise_project_duration3, #enterprise_project_duration4, #enterprise_project_duration5, #enterprise_project_duration6, #enterprise_project_duration7, #enterprise_project_duration8, #enterprise_project_duration9, #enterprise_project_flag1, #enterprise_project_flag10, #enterprise_project_flag11, #enterprise_project_flag12, #enterprise_project_flag13, #enterprise_project_flag14, #enterprise_project_flag15, #enterprise_project_flag16, #enterprise_project_flag17, #enterprise_project_flag18, #enterprise_project_flag19, #enterprise_project_flag2, #enterprise_project_flag20, #enterprise_project_flag3, #enterprise_project_flag4, #enterprise_project_flag5, #enterprise_project_flag6, #enterprise_project_flag7, #enterprise_project_flag8, #enterprise_project_flag9, #enterprise_project_number1, #enterprise_project_number10, #enterprise_project_number11, #enterprise_project_number12, #enterprise_project_number13, #enterprise_project_number14, #enterprise_project_number15, #enterprise_project_number16, #enterprise_project_number17, #enterprise_project_number18, #enterprise_project_number19, #enterprise_project_number2, #enterprise_project_number20, #enterprise_project_number21, #enterprise_project_number22, #enterprise_project_number23, #enterprise_project_number24, #enterprise_project_number25, #enterprise_project_number26, #enterprise_project_number27, #enterprise_project_number28, #enterprise_project_number29, #enterprise_project_number3, #enterprise_project_number30, #enterprise_project_number31, #enterprise_project_number32, #enterprise_project_number33, #enterprise_project_number34, #enterprise_project_number35, #enterprise_project_number36, #enterprise_project_number37, #enterprise_project_number38, #enterprise_project_number39, #enterprise_project_number4, #enterprise_project_number40, #enterprise_project_number5, #enterprise_project_number6, #enterprise_project_number7, #enterprise_project_number8, #enterprise_project_number9, #enterprise_project_outline_code1, #enterprise_project_outline_code10, #enterprise_project_outline_code11, #enterprise_project_outline_code12, #enterprise_project_outline_code13, #enterprise_project_outline_code14, #enterprise_project_outline_code15, #enterprise_project_outline_code16, #enterprise_project_outline_code17, #enterprise_project_outline_code18, #enterprise_project_outline_code19, #enterprise_project_outline_code2, #enterprise_project_outline_code20, #enterprise_project_outline_code21, #enterprise_project_outline_code22, #enterprise_project_outline_code23, #enterprise_project_outline_code24, #enterprise_project_outline_code25, #enterprise_project_outline_code26, #enterprise_project_outline_code27, #enterprise_project_outline_code28, #enterprise_project_outline_code29, #enterprise_project_outline_code3, #enterprise_project_outline_code30, #enterprise_project_outline_code4, #enterprise_project_outline_code5, #enterprise_project_outline_code6, #enterprise_project_outline_code7, #enterprise_project_outline_code8, #enterprise_project_outline_code9, #enterprise_project_text1, #enterprise_project_text10, #enterprise_project_text11, #enterprise_project_text12, #enterprise_project_text13, #enterprise_project_text14, #enterprise_project_text15, #enterprise_project_text16, #enterprise_project_text17, #enterprise_project_text18, #enterprise_project_text19, #enterprise_project_text2, #enterprise_project_text20, #enterprise_project_text21, #enterprise_project_text22, #enterprise_project_text23, #enterprise_project_text24, #enterprise_project_text25, #enterprise_project_text26, #enterprise_project_text27, #enterprise_project_text28, #enterprise_project_text29, #enterprise_project_text3, #enterprise_project_text30, #enterprise_project_text31, #enterprise_project_text32, #enterprise_project_text33, #enterprise_project_text34, #enterprise_project_text35, #enterprise_project_text36, #enterprise_project_text37, #enterprise_project_text38, #enterprise_project_text39, #enterprise_project_text4, #enterprise_project_text40, #enterprise_project_text5, #enterprise_project_text6, #enterprise_project_text7, #enterprise_project_text8, #enterprise_project_text9, #enterprise_text1, #enterprise_text10, #enterprise_text11, #enterprise_text12, #enterprise_text13, #enterprise_text14, #enterprise_text15, #enterprise_text16, #enterprise_text17, #enterprise_text18, #enterprise_text19, #enterprise_text2, #enterprise_text20, #enterprise_text21, #enterprise_text22, #enterprise_text23, #enterprise_text24, #enterprise_text25, #enterprise_text26, #enterprise_text27, #enterprise_text28, #enterprise_text29, #enterprise_text3, #enterprise_text30, #enterprise_text31, #enterprise_text32, #enterprise_text33, #enterprise_text34, #enterprise_text35, #enterprise_text36, #enterprise_text37, #enterprise_text38, #enterprise_text39, #enterprise_text4, #enterprise_text40, #enterprise_text5, #enterprise_text6, #enterprise_text7, #enterprise_text8, #enterprise_text9, #error_message, #estimated, #expanded, #expense_items, #external_early_start, #external_late_finish, #external_project, #external_task, #feature_of_work, #finish, #finish1, #finish10, #finish2, #finish3, #finish4, #finish5, #finish6, #finish7, #finish8, #finish9, #finish_slack, #finish_text, #finish_variance, #fixed_cost, #fixed_cost_accrual, #fixed_duration, #flag1, #flag10, #flag11, #flag12, #flag13, #flag14, #flag15, #flag16, #flag17, #flag18, #flag19, #flag2, #flag20, #flag3, #flag4, #flag5, #flag6, #flag7, #flag8, #flag9, #free_slack, #group_by_summary, #guid, #hammock_code, #hide_bar, #hyperlink, #hyperlink_address, #hyperlink_data, #hyperlink_href, #hyperlink_screen_tip, #hyperlink_subaddress, #id, #ignore_resource_calendar, #ignore_warnings, included, #index, #indicators, #is_duration_valid, #is_finish_valid, #is_start_valid, #late_finish, #late_start, #level_assignments, #leveling_can_split, #leveling_delay, #leveling_delay_units, #linked_fields, #location_unique_id, #longest_path, #mail, #manager, #manual_duration, #manual_duration_units, #marked, #milestone, #mod_or_claim_number, #name, #notes, #null, #number1, #number10, #number11, #number12, #number13, #number14, #number15, #number16, #number17, #number18, #number19, #number2, #number20, #number3, #number4, #number5, #number6, #number7, #number8, #number9, #objects, #outline_code1, #outline_code10, #outline_code10_index, #outline_code1_index, #outline_code2, #outline_code2_index, #outline_code3, #outline_code3_index, #outline_code4, #outline_code4_index, #outline_code5, #outline_code5_index, #outline_code6, #outline_code6_index, #outline_code7, #outline_code7_index, #outline_code8, #outline_code8_index, #outline_code9, #outline_code9_index, #outline_level, #outline_number, #overall_percent_complete, #overallocated, #overtime_cost, #overtime_work, #parent_task_unique_id, #path_driven_successor, #path_driving_predecessor, #path_predecessor, #path_successor, #peak, #percent_complete, #percent_complete_type, #percent_work_complete, #phase_of_work, #physical_percent_complete, #placeholder, #planned_cost, #planned_duration, #planned_finish, #planned_start, #planned_work, #preleveled_finish, #preleveled_start, #primary_resource_id, #priority, #project, #publish, #recalc_outline_codes, #recurring, #recurring_data, #regular_work, #remaining_cost, #remaining_duration, #remaining_early_finish, #remaining_early_start, #remaining_late_finish, #remaining_late_start, #remaining_overtime_cost, #remaining_overtime_work, #remaining_work, #request_demand, #resource_enterprise_multi_value_code20, #resource_enterprise_multi_value_code21, #resource_enterprise_multi_value_code22, #resource_enterprise_multi_value_code23, #resource_enterprise_multi_value_code24, #resource_enterprise_multi_value_code25, #resource_enterprise_multi_value_code26, #resource_enterprise_multi_value_code27, #resource_enterprise_multi_value_code28, #resource_enterprise_multi_value_code29, #resource_enterprise_outline_code1, #resource_enterprise_outline_code10, #resource_enterprise_outline_code11, #resource_enterprise_outline_code12, #resource_enterprise_outline_code13, #resource_enterprise_outline_code14, #resource_enterprise_outline_code15, #resource_enterprise_outline_code16, #resource_enterprise_outline_code17, #resource_enterprise_outline_code18, #resource_enterprise_outline_code19, #resource_enterprise_outline_code2, #resource_enterprise_outline_code20, #resource_enterprise_outline_code21, #resource_enterprise_outline_code22, #resource_enterprise_outline_code23, #resource_enterprise_outline_code24, #resource_enterprise_outline_code25, #resource_enterprise_outline_code26, #resource_enterprise_outline_code27, #resource_enterprise_outline_code28, #resource_enterprise_outline_code29, #resource_enterprise_outline_code3, #resource_enterprise_outline_code4, #resource_enterprise_outline_code5, #resource_enterprise_outline_code6, #resource_enterprise_outline_code7, #resource_enterprise_outline_code8, #resource_enterprise_outline_code9, #resource_enterprise_rbs, #resource_group, #resource_initials, #resource_names, #resource_phonetics, #resource_type, #response_pending, #responsibility_code, #resume, #resume_no_earlier_than, #resume_valid, #rollup, #scheduled_duration, #scheduled_finish, #scheduled_start, #secondary_constraint_date, #secondary_constraint_type, #section, #sequence_number, #show_on_board, #spi, #splits, #sprint, #sprint_finish, #sprint_id, #sprint_start, #start, #start1, #start10, #start2, #start3, #start4, #start5, #start6, #start7, #start8, #start9, #start_slack, #start_text, #start_variance, #status, #status_indicator, #status_manager, #steps, #stop, #stored_material, #subproject, #subproject_file, #subproject_guid, #subproject_read_only, #subproject_task_id, #subproject_task_unique_id, #subproject_tasks_uniqueid_offset, #summary, #summary_progress, #suspend_date, #sv, #svpercent, #task_calendar, #task_calendar_guid, #task_mode, #task_summary_name, #tcpi, #teamstatus_pending, #text1, #text10, #text11, #text12, #text13, #text14, #text15, #text16, #text17, #text18, #text19, #text2, #text20, #text21, #text22, #text23, #text24, #text25, #text26, #text27, #text28, #text29, #text3, #text30, #text4, #text5, #text6, #text7, #text8, #text9, #total_slack, #type, #unavailable, #unique_id, #unique_id_predecessors, #unique_id_successors, #update_needed, #vac, #warning, #wbs, #wbs_predecessors, #wbs_successors, #work, #work_area_code, #work_contour, #work_variance, #workers_per_day

Constructor Details

#initialize(parent_project, attribute_values) ⇒ Task

Returns a new instance of Task.



11
12
13
14
15
16
17
# File 'lib/mpxj/task.rb', line 11

def initialize(parent_project, attribute_values)
  super(parent_project, attribute_values)
  @assignments = []
  @child_tasks = []
  process_relations
  process_hierarchy
end

Instance Attribute Details

#assignmentsObject (readonly)

Returns the value of attribute assignments.



6
7
8
# File 'lib/mpxj/task.rb', line 6

def assignments
  @assignments
end

#child_tasksObject (readonly)

Returns the value of attribute child_tasks.



9
10
11
# File 'lib/mpxj/task.rb', line 9

def child_tasks
  @child_tasks
end

#predecessorsObject (readonly)

Returns the value of attribute predecessors.



7
8
9
# File 'lib/mpxj/task.rb', line 7

def predecessors
  @predecessors
end

#successorsObject (readonly)

Returns the value of attribute successors.



8
9
10
# File 'lib/mpxj/task.rb', line 8

def successors
  @successors
end

Instance Method Details

#parent_taskTask?

Retrieve the parent task of this task

Returns:

  • (Task)

    if this task is the child of another task

  • (nil)

    if this is the root task



23
24
25
# File 'lib/mpxj/task.rb', line 23

def parent_task
  parent_project.get_task_by_unique_id(attribute_values['parent_task_unique_id']&.to_i)
end