My requirements are filter tasks by name or time intervals and update task name, resource, start, finish time. I’ve tried by id and applied if condition for time intervals.
Do you have any search methods which will return the list of tasks search by specific time intervals.
For update task name, resource, start, finish time I could not able to do due to evolution mode.
2. Could you please let me now, before purchase how can I make sure that those functionality would work properly. Even I did not find your documentation to update those.
I am looking for Java solution. The java documentation I searched, all are create new task (Aspose.Tasks for Java). Could you please tell me how to update task properties as I mentioned.
Answer to your query : Do you mean that when you try to save the project, “The operation is not allowed in evaluation mode.” exception is thrown ?
Yes. Getting exception . “Exception in thread “main” java.lang.UnsupportedOperationException: The operation is not allowed in evaluation mode.”
The main idea is the same: iterate over all project’s tasks, and modify the task if it
satisfies the conditions:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-M-d HH:mm");
Date testDate = sdf.parse("2022-1-4 9:30");
for (Task t : project.enumerateAllChildTasks())
{
if (t.get(Tsk.START).before(testDate)) // Sample condition
{
// Update task as per your requirements
t.set(Tsk.START, testDate);
t.set(Tsk.Name, "Updated name");
}
}
project.save("output.mpp");
Your haven’t set the license. You should get temporary license and apply it in your code. Please refer to Applying License section.