find correct stage on edit task