Class: OTRS::Change::WorkOrder

Inherits:
OTRS::Change show all
Defined in:
lib/otrs_connector/change/work_order.rb

Instance Attribute Summary collapse

Attributes inherited from OTRS::Change

#cab_agents, #cab_customers, #category, #category_id, #change_builder_id, #change_free_key1, #change_free_key10, #change_free_key11, #change_free_key12, #change_free_key13, #change_free_key14, #change_free_key15, #change_free_key16, #change_free_key17, #change_free_key18, #change_free_key19, #change_free_key2, #change_free_key20, #change_free_key21, #change_free_key22, #change_free_key23, #change_free_key24, #change_free_key25, #change_free_key26, #change_free_key27, #change_free_key28, #change_free_key29, #change_free_key3, #change_free_key30, #change_free_key31, #change_free_key32, #change_free_key33, #change_free_key34, #change_free_key35, #change_free_key36, #change_free_key37, #change_free_key38, #change_free_key39, #change_free_key4, #change_free_key40, #change_free_key41, #change_free_key42, #change_free_key43, #change_free_key44, #change_free_key45, #change_free_key46, #change_free_key47, #change_free_key48, #change_free_key49, #change_free_key5, #change_free_key50, #change_free_key6, #change_free_key7, #change_free_key8, #change_free_key9, #change_free_text1, #change_free_text10, #change_free_text11, #change_free_text12, #change_free_text13, #change_free_text14, #change_free_text15, #change_free_text16, #change_free_text17, #change_free_text18, #change_free_text19, #change_free_text2, #change_free_text20, #change_free_text21, #change_free_text22, #change_free_text23, #change_free_text24, #change_free_text25, #change_free_text26, #change_free_text27, #change_free_text28, #change_free_text29, #change_free_text3, #change_free_text30, #change_free_text31, #change_free_text32, #change_free_text33, #change_free_text34, #change_free_text35, #change_free_text36, #change_free_text37, #change_free_text38, #change_free_text39, #change_free_text4, #change_free_text40, #change_free_text41, #change_free_text42, #change_free_text43, #change_free_text44, #change_free_text45, #change_free_text46, #change_free_text47, #change_free_text48, #change_free_text49, #change_free_text5, #change_free_text50, #change_free_text6, #change_free_text7, #change_free_text8, #change_free_text9, #change_manager_id, #change_number, #change_state, #change_state_id, #change_state_signal, #change_title, #description, #description_plain, #impact, #impact_id, #justification, #justification_plain, #priority, #priority_id, #requested_time, #work_order_count, #work_order_i_ds

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OTRS::Change

all, #work_orders

Methods inherited from OTRS

api_url, api_url=, #connect, connect, object_preprocessor, password, password=, user, user=

Constructor Details

#initialize(attributes = {}) ⇒ WorkOrder

Returns a new instance of WorkOrder.



138
139
140
141
142
143
# File 'lib/otrs_connector/change/work_order.rb', line 138

def initialize(attributes = {})
  attributes.each do |name, value|
    #self.class.set_accessor(name.to_s.underscore)
    send("#{name.to_s.underscore.to_sym}=", value)
  end
end

Instance Attribute Details

#accounted_timeObject

Returns the value of attribute accounted_time.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def accounted_time
  @accounted_time
end

#actual_end_timeObject

Returns the value of attribute actual_end_time.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def actual_end_time
  @actual_end_time
end

#actual_start_timeObject

Returns the value of attribute actual_start_time.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def actual_start_time
  @actual_start_time
end

#change_byObject

Returns the value of attribute change_by.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def change_by
  @change_by
end

#change_idObject

Returns the value of attribute change_id.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def change_id
  @change_id
end

#change_timeObject

Returns the value of attribute change_time.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def change_time
  @change_time
end

#create_byObject

Returns the value of attribute create_by.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def create_by
  @create_by
end

#create_timeObject

Returns the value of attribute create_time.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def create_time
  @create_time
end

#instructionObject

Returns the value of attribute instruction.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def instruction
  @instruction
end

#instruction_plainObject

Returns the value of attribute instruction_plain.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def instruction_plain
  @instruction_plain
end

#planned_effortObject

Returns the value of attribute planned_effort.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def planned_effort
  @planned_effort
end

#planned_end_timeObject

Returns the value of attribute planned_end_time.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def planned_end_time
  @planned_end_time
end

#planned_start_timeObject

Returns the value of attribute planned_start_time.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def planned_start_time
  @planned_start_time
end

#reportObject

Returns the value of attribute report.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def report
  @report
end

#report_plainObject

Returns the value of attribute report_plain.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def report_plain
  @report_plain
end

#work_order_agent_idObject

Returns the value of attribute work_order_agent_id.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_agent_id
  @work_order_agent_id
end

#work_order_free_key1Object

Returns the value of attribute work_order_free_key1.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key1
  @work_order_free_key1
end

#work_order_free_key10Object

Returns the value of attribute work_order_free_key10.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key10
  @work_order_free_key10
end

#work_order_free_key11Object

Returns the value of attribute work_order_free_key11.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key11
  @work_order_free_key11
end

#work_order_free_key12Object

Returns the value of attribute work_order_free_key12.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key12
  @work_order_free_key12
end

#work_order_free_key13Object

Returns the value of attribute work_order_free_key13.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key13
  @work_order_free_key13
end

#work_order_free_key14Object

Returns the value of attribute work_order_free_key14.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key14
  @work_order_free_key14
end

#work_order_free_key15Object

Returns the value of attribute work_order_free_key15.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key15
  @work_order_free_key15
end

#work_order_free_key16Object

Returns the value of attribute work_order_free_key16.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key16
  @work_order_free_key16
end

#work_order_free_key17Object

Returns the value of attribute work_order_free_key17.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key17
  @work_order_free_key17
end

#work_order_free_key18Object

Returns the value of attribute work_order_free_key18.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key18
  @work_order_free_key18
end

#work_order_free_key19Object

Returns the value of attribute work_order_free_key19.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key19
  @work_order_free_key19
end

#work_order_free_key2Object

Returns the value of attribute work_order_free_key2.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key2
  @work_order_free_key2
end

#work_order_free_key20Object

Returns the value of attribute work_order_free_key20.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key20
  @work_order_free_key20
end

#work_order_free_key21Object

Returns the value of attribute work_order_free_key21.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key21
  @work_order_free_key21
end

#work_order_free_key22Object

Returns the value of attribute work_order_free_key22.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key22
  @work_order_free_key22
end

#work_order_free_key23Object

Returns the value of attribute work_order_free_key23.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key23
  @work_order_free_key23
end

#work_order_free_key24Object

Returns the value of attribute work_order_free_key24.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key24
  @work_order_free_key24
end

#work_order_free_key25Object

Returns the value of attribute work_order_free_key25.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key25
  @work_order_free_key25
end

#work_order_free_key26Object

Returns the value of attribute work_order_free_key26.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key26
  @work_order_free_key26
end

#work_order_free_key27Object

Returns the value of attribute work_order_free_key27.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key27
  @work_order_free_key27
end

#work_order_free_key28Object

Returns the value of attribute work_order_free_key28.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key28
  @work_order_free_key28
end

#work_order_free_key29Object

Returns the value of attribute work_order_free_key29.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key29
  @work_order_free_key29
end

#work_order_free_key3Object

Returns the value of attribute work_order_free_key3.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key3
  @work_order_free_key3
end

#work_order_free_key30Object

Returns the value of attribute work_order_free_key30.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key30
  @work_order_free_key30
end

#work_order_free_key31Object

Returns the value of attribute work_order_free_key31.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key31
  @work_order_free_key31
end

#work_order_free_key32Object

Returns the value of attribute work_order_free_key32.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key32
  @work_order_free_key32
end

#work_order_free_key33Object

Returns the value of attribute work_order_free_key33.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key33
  @work_order_free_key33
end

#work_order_free_key34Object

Returns the value of attribute work_order_free_key34.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key34
  @work_order_free_key34
end

#work_order_free_key35Object

Returns the value of attribute work_order_free_key35.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key35
  @work_order_free_key35
end

#work_order_free_key36Object

Returns the value of attribute work_order_free_key36.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key36
  @work_order_free_key36
end

#work_order_free_key37Object

Returns the value of attribute work_order_free_key37.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key37
  @work_order_free_key37
end

#work_order_free_key38Object

Returns the value of attribute work_order_free_key38.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key38
  @work_order_free_key38
end

#work_order_free_key39Object

Returns the value of attribute work_order_free_key39.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key39
  @work_order_free_key39
end

#work_order_free_key4Object

Returns the value of attribute work_order_free_key4.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key4
  @work_order_free_key4
end

#work_order_free_key40Object

Returns the value of attribute work_order_free_key40.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key40
  @work_order_free_key40
end

#work_order_free_key41Object

Returns the value of attribute work_order_free_key41.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key41
  @work_order_free_key41
end

#work_order_free_key42Object

Returns the value of attribute work_order_free_key42.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key42
  @work_order_free_key42
end

#work_order_free_key43Object

Returns the value of attribute work_order_free_key43.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key43
  @work_order_free_key43
end

#work_order_free_key44Object

Returns the value of attribute work_order_free_key44.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key44
  @work_order_free_key44
end

#work_order_free_key45Object

Returns the value of attribute work_order_free_key45.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key45
  @work_order_free_key45
end

#work_order_free_key46Object

Returns the value of attribute work_order_free_key46.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key46
  @work_order_free_key46
end

#work_order_free_key47Object

Returns the value of attribute work_order_free_key47.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key47
  @work_order_free_key47
end

#work_order_free_key48Object

Returns the value of attribute work_order_free_key48.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key48
  @work_order_free_key48
end

#work_order_free_key49Object

Returns the value of attribute work_order_free_key49.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key49
  @work_order_free_key49
end

#work_order_free_key5Object

Returns the value of attribute work_order_free_key5.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key5
  @work_order_free_key5
end

#work_order_free_key50Object

Returns the value of attribute work_order_free_key50.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key50
  @work_order_free_key50
end

#work_order_free_key6Object

Returns the value of attribute work_order_free_key6.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key6
  @work_order_free_key6
end

#work_order_free_key7Object

Returns the value of attribute work_order_free_key7.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key7
  @work_order_free_key7
end

#work_order_free_key8Object

Returns the value of attribute work_order_free_key8.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key8
  @work_order_free_key8
end

#work_order_free_key9Object

Returns the value of attribute work_order_free_key9.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_key9
  @work_order_free_key9
end

#work_order_free_text1Object

Returns the value of attribute work_order_free_text1.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text1
  @work_order_free_text1
end

#work_order_free_text10Object

Returns the value of attribute work_order_free_text10.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text10
  @work_order_free_text10
end

#work_order_free_text11Object

Returns the value of attribute work_order_free_text11.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text11
  @work_order_free_text11
end

#work_order_free_text12Object

Returns the value of attribute work_order_free_text12.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text12
  @work_order_free_text12
end

#work_order_free_text13Object

Returns the value of attribute work_order_free_text13.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text13
  @work_order_free_text13
end

#work_order_free_text14Object

Returns the value of attribute work_order_free_text14.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text14
  @work_order_free_text14
end

#work_order_free_text15Object

Returns the value of attribute work_order_free_text15.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text15
  @work_order_free_text15
end

#work_order_free_text16Object

Returns the value of attribute work_order_free_text16.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text16
  @work_order_free_text16
end

#work_order_free_text17Object

Returns the value of attribute work_order_free_text17.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text17
  @work_order_free_text17
end

#work_order_free_text18Object

Returns the value of attribute work_order_free_text18.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text18
  @work_order_free_text18
end

#work_order_free_text19Object

Returns the value of attribute work_order_free_text19.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text19
  @work_order_free_text19
end

#work_order_free_text2Object

Returns the value of attribute work_order_free_text2.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text2
  @work_order_free_text2
end

#work_order_free_text20Object

Returns the value of attribute work_order_free_text20.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text20
  @work_order_free_text20
end

#work_order_free_text21Object

Returns the value of attribute work_order_free_text21.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text21
  @work_order_free_text21
end

#work_order_free_text22Object

Returns the value of attribute work_order_free_text22.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text22
  @work_order_free_text22
end

#work_order_free_text23Object

Returns the value of attribute work_order_free_text23.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text23
  @work_order_free_text23
end

#work_order_free_text24Object

Returns the value of attribute work_order_free_text24.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text24
  @work_order_free_text24
end

#work_order_free_text25Object

Returns the value of attribute work_order_free_text25.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text25
  @work_order_free_text25
end

#work_order_free_text26Object

Returns the value of attribute work_order_free_text26.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text26
  @work_order_free_text26
end

#work_order_free_text27Object

Returns the value of attribute work_order_free_text27.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text27
  @work_order_free_text27
end

#work_order_free_text28Object

Returns the value of attribute work_order_free_text28.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text28
  @work_order_free_text28
end

#work_order_free_text29Object

Returns the value of attribute work_order_free_text29.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text29
  @work_order_free_text29
end

#work_order_free_text3Object

Returns the value of attribute work_order_free_text3.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text3
  @work_order_free_text3
end

#work_order_free_text30Object

Returns the value of attribute work_order_free_text30.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text30
  @work_order_free_text30
end

#work_order_free_text31Object

Returns the value of attribute work_order_free_text31.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text31
  @work_order_free_text31
end

#work_order_free_text32Object

Returns the value of attribute work_order_free_text32.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text32
  @work_order_free_text32
end

#work_order_free_text33Object

Returns the value of attribute work_order_free_text33.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text33
  @work_order_free_text33
end

#work_order_free_text34Object

Returns the value of attribute work_order_free_text34.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text34
  @work_order_free_text34
end

#work_order_free_text35Object

Returns the value of attribute work_order_free_text35.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text35
  @work_order_free_text35
end

#work_order_free_text36Object

Returns the value of attribute work_order_free_text36.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text36
  @work_order_free_text36
end

#work_order_free_text37Object

Returns the value of attribute work_order_free_text37.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text37
  @work_order_free_text37
end

#work_order_free_text38Object

Returns the value of attribute work_order_free_text38.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text38
  @work_order_free_text38
end

#work_order_free_text39Object

Returns the value of attribute work_order_free_text39.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text39
  @work_order_free_text39
end

#work_order_free_text4Object

Returns the value of attribute work_order_free_text4.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text4
  @work_order_free_text4
end

#work_order_free_text40Object

Returns the value of attribute work_order_free_text40.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text40
  @work_order_free_text40
end

#work_order_free_text41Object

Returns the value of attribute work_order_free_text41.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text41
  @work_order_free_text41
end

#work_order_free_text42Object

Returns the value of attribute work_order_free_text42.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text42
  @work_order_free_text42
end

#work_order_free_text43Object

Returns the value of attribute work_order_free_text43.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text43
  @work_order_free_text43
end

#work_order_free_text44Object

Returns the value of attribute work_order_free_text44.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text44
  @work_order_free_text44
end

#work_order_free_text45Object

Returns the value of attribute work_order_free_text45.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text45
  @work_order_free_text45
end

#work_order_free_text46Object

Returns the value of attribute work_order_free_text46.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text46
  @work_order_free_text46
end

#work_order_free_text47Object

Returns the value of attribute work_order_free_text47.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text47
  @work_order_free_text47
end

#work_order_free_text48Object

Returns the value of attribute work_order_free_text48.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text48
  @work_order_free_text48
end

#work_order_free_text49Object

Returns the value of attribute work_order_free_text49.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text49
  @work_order_free_text49
end

#work_order_free_text5Object

Returns the value of attribute work_order_free_text5.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text5
  @work_order_free_text5
end

#work_order_free_text50Object

Returns the value of attribute work_order_free_text50.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text50
  @work_order_free_text50
end

#work_order_free_text6Object

Returns the value of attribute work_order_free_text6.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text6
  @work_order_free_text6
end

#work_order_free_text7Object

Returns the value of attribute work_order_free_text7.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text7
  @work_order_free_text7
end

#work_order_free_text8Object

Returns the value of attribute work_order_free_text8.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text8
  @work_order_free_text8
end

#work_order_free_text9Object

Returns the value of attribute work_order_free_text9.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_free_text9
  @work_order_free_text9
end

#work_order_idObject

Returns the value of attribute work_order_id.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_id
  @work_order_id
end

#work_order_numberObject

Returns the value of attribute work_order_number.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_number
  @work_order_number
end

#work_order_stateObject

Returns the value of attribute work_order_state.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_state
  @work_order_state
end

#work_order_state_idObject

Returns the value of attribute work_order_state_id.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_state_id
  @work_order_state_id
end

#work_order_state_signalObject

Returns the value of attribute work_order_state_signal.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_state_signal
  @work_order_state_signal
end

#work_order_titleObject

Returns the value of attribute work_order_title.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_title
  @work_order_title
end

#work_order_typeObject

Returns the value of attribute work_order_type.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_type
  @work_order_type
end

#work_order_type_idObject

Returns the value of attribute work_order_type_id.



3
4
5
# File 'lib/otrs_connector/change/work_order.rb', line 3

def work_order_type_id
  @work_order_type_id
end

Class Method Details

.find(id) ⇒ Object



198
199
200
201
202
# File 'lib/otrs_connector/change/work_order.rb', line 198

def self.find(id)
  data = { 'WorkOrderID' => id, 'UserID' => 1 }
  params = { :object => 'WorkOrderObject', :method => 'WorkOrderGet', :data => data }
  self.object_preprocessor connect(params)
end

.where(attributes) ⇒ Object



216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/otrs_connector/change/work_order.rb', line 216

def self.where(attributes)
  tmp = {}
  attributes.each do |key,value|
    tmp[key.to_s.camelize] = value      #Copies ruby style keys to camel case for OTRS
  end
  data = tmp
  params = { :object => 'WorkOrderObjectCustom', :method => 'WorkOrderSearch', :data => data }
  a = connect(params).flatten
  results = self.superclass::Relation.new
  a.each do |c|
    results << self.new(c)
  end
  results
end

Instance Method Details

#attributesObject



145
146
147
148
149
150
151
# File 'lib/otrs_connector/change/work_order.rb', line 145

def attributes
  attributes = {}
  self.instance_variables.each do |v|
    attributes[v.to_s.gsub('@','').to_sym] = self.instance_variable_get(v)
  end
  attributes
end

#changeObject



231
232
233
# File 'lib/otrs_connector/change/work_order.rb', line 231

def change
  self.class.superclass::Change.find(self.change_id)
end

#create(attributes) ⇒ Object



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/otrs_connector/change/work_order.rb', line 157

def create(attributes)
  tmp = {}
  attributes.each do |key,value|
    tmp[key.to_s.camelize.to_sym] = value
  end
  attributes = tmp
  attributes[:UserID] = '1'
  attributes[:ChangeID] = attributes[:ChangeId]
  attributes.delete(:ChangeId)
  data = attributes
  params = { :object => 'WorkOrderObject', :method => 'WorkOrderAdd', :data => data }
  a = connect(params)
  id = a.first
  if id.nil?
    nil
  else
    b = self.class.find(id)
    attributes = b.attributes
    attributes.each do |key,value|
      instance_variable_set "@#{key.to_s}", value
    end
    b
  end
end

#destroyObject



204
205
206
207
208
209
210
211
212
213
214
# File 'lib/otrs_connector/change/work_order.rb', line 204

def destroy
  id = @change_id
  if self.class.find(id)
    data = { 'ChangeID' => id, 'UserID' => 1 }
    params = { :object => 'WorkOrderObject', :method => 'WorkOrderDelete', :data => data }
    connect(params)
    "WorkOrderID #{id} deleted"
  else
    raise "NoSuchWorkOrderID #{id}"
  end
end

#idObject



243
244
245
# File 'lib/otrs_connector/change/work_order.rb', line 243

def id
  self.work_order_id
end

#nameObject



235
236
237
# File 'lib/otrs_connector/change/work_order.rb', line 235

def name
  self.work_order_title
end

#persisted?Boolean

def self.set_accessor(key)

attr_accessor key.to_sym

end

Returns:

  • (Boolean)


134
135
136
# File 'lib/otrs_connector/change/work_order.rb', line 134

def persisted?
  false
end

#saveObject



153
154
155
# File 'lib/otrs_connector/change/work_order.rb', line 153

def save
  self.create(self.attributes)
end

#statusObject



247
248
249
# File 'lib/otrs_connector/change/work_order.rb', line 247

def status
  self.work_order_status
end

#titleObject



239
240
241
# File 'lib/otrs_connector/change/work_order.rb', line 239

def title
  self.work_order_title
end

#update_attributes(attributes) ⇒ Object



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/otrs_connector/change/work_order.rb', line 182

def update_attributes(attributes)
  tmp = {}
  attributes.each do |key,value|
    tmp[key.to_s.camelize] = value      #Copies ruby style keys to camel case for OTRS
  end
  tmp['WorkOrderID'] = @work_order_id
  data = tmp
  params = { :object => 'WorkOrderObject', :method => 'WorkOrderUpdate', :data => data }
  a = connect(params)
  if a.first.nil?
    nil
  else
    return self
  end
end