Class: CardCopy
Instance Method Summary
collapse
Methods inherited from ObjectCopy
#card_values, #copy, #excluded_attributes, #fetch_object, #fetch_project, #find_project_in_new_workspace, #initialize, #logger, #new_workspace, #rally_rest, #remember, #tangle, #user_exists?
Constructor Details
This class inherits a constructor from ObjectCopy
Instance Method Details
#copy_children ⇒ Object
26
27
28
29
30
|
# File 'lib/translate/copy/card_copy.rb', line 26
def copy_children
@object.tasks.each do |task|
task.copy(new_workspace, :work_product => @new_object)
end if @object.tasks
end
|
#create_object(values) ⇒ Object
22
23
24
|
# File 'lib/translate/copy/card_copy.rb', line 22
def create_object(values)
rally_rest.create(:hierarchical_requirement, values)
end
|
#shallow_copy(object) ⇒ Object
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/translate/copy/card_copy.rb', line 2
def shallow_copy(object)
values = super(@object.work_product)
values.merge! card_values(@object)
values[:name] = "Scheduled child of #{values[:name]}"
values[:notes] = "#{values[:notes]} <br> Scheduled Note: #{@object.schedule_note}"
values
end
|
#type_as_symbol ⇒ Object
32
33
34
|
# File 'lib/translate/copy/card_copy.rb', line 32
def type_as_symbol
:hierarchical_requirement
end
|