I would like to change the status of all 'assigned' tasks in Workforce to 'Unassigned' , I found the github stript:
project.assignments.search()[0].update(status="Declined",declined_date=datetime.datetime.now(), declined_comment="not doing it")
print("Assignments before Deletion: " + str(len(project.assignments.search())))
project.assignments_item.layers[0].delete_features(where="status=4")
print("Assignments after Deletion: " + str(len(project.assignments.search())))
that I have changed to :
project.assignments.search()[0].update(status="Assigned")
print("Assignments before Change: " + str(len(project.assignments.search())))
project.assignments_item.layers[0].delete_features(where="status=1")
print("Assignments after Change: " + str(len(project.assignments.search())))
but I'm new at Python; I don't want to 'delete.features' but adapt, change this (where="status=1") to .... (where="status=0")
How to to this ?
Please help