Merge "Clear affiliation ids and lock task packages when clearing DO/PO"