(WIP) Migrate assignment accept/reject/close code to a helper in models, to use it in the Web API.