added logic for storing the datetimeended-field when a part has failed