can you add a doc string summarizing what this does? something like: "everytime a form is submitted go through the related cases' histories and update the statuses for all relevant records" (not sure if that's right)