Stop or Resume an Assignment in Ruby

Aspose.Tasks - Stop or Resume an Assignment

To Stop or Resume an Assignment using Aspose.Tasks Java for Ruby, simply invoke StopAndResumeAssignment module. Here you can see example code.

Ruby Code

 1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
 2resource_assignments = project.getResourceAssignments().toList()
 3i = 0
 4while i < resource_assignments.size()
 5  assignment = resource_assignments.get(i)
 6  if assignment.get(Rjb::import('com.aspose.tasks.Asn').STOP).toString() == "1/1/2000"
 7    puts "NA"
 8  else
 9     puts assignment.get(Rjb::import('com.aspose.tasks.Asn').STOP).toString()
10  end
11  if assignment.get(Rjb::import('com.aspose.tasks.Asn').RESUME).toString() == "1/1/2000"
12    puts "NA"
13  else
14    puts assignment.get(Rjb::import('com.aspose.tasks.Asn').RESUME).toString()
15  end
16  i += 1
17end

Download Running Code

Download Stop or Resume an Assignment (Aspose.Tasks) from any of the below mentioned social coding sites:

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.