add new stage when user leave current page on  create assignment function