@@ -88,6 +88,26 @@ def test_editing_just_a_start_date_with_no_duration_or_finish(self):
8888 assert task_time .ScheduleFinish is None
8989 assert task_time .ScheduleDuration is None
9090
91+ def test_editing_just_a_start_date_with_no_duration_or_finish_but_with_a_calendar (self ):
92+ ifcopenshell .api .run ("root.create_entity" , self .file , ifc_class = "IfcProject" )
93+ calendar = ifcopenshell .api .run ("sequence.add_work_calendar" , self .file )
94+ task = self .file .createIfcTask ()
95+ ifcopenshell .api .run ("control.assign_control" , self .file , relating_control = calendar , related_object = task )
96+ task_time = ifcopenshell .api .run ("sequence.add_task_time" , self .file , task = task )
97+ ifcopenshell .api .run (
98+ "sequence.edit_task_time" ,
99+ self .file ,
100+ task_time = task_time ,
101+ attributes = {
102+ "ScheduleDuration" : None ,
103+ "ScheduleStart" : datetime .datetime (2000 , 1 , 1 ),
104+ "ScheduleFinish" : None ,
105+ },
106+ )
107+ assert task_time .ScheduleStart == "2000-01-01T00:00:00"
108+ assert task_time .ScheduleFinish is None
109+ assert task_time .ScheduleDuration is None
110+
91111 def test_schedule_finish_dates_are_auto_calculated_if_possible (self ):
92112 task_time = ifcopenshell .api .run ("sequence.add_task_time" , self .file , task = self .file .createIfcTask ())
93113 ifcopenshell .api .run (
0 commit comments