Rewrite trials_controller

Summary

From #393760 (closed) - we'd like to rewrite/cleanup the trials_controller to reduce/remove some of the complex logic loops that have grown there.

Goals

  • Every path is tested from a request/response and feature(if necessary) level
  • Trials Controller only has crud actions necessary for new trial creation
  • Each action only has maximum of 2 branches in the controller layer - success and failure.
  • View layer is simplified
  • Create Service objects as needed to move remaining logic out of the controller layer.

Note: we need to preserve /-/trials/new path, but all others can change if needed.

Plan 🚧

  • Ensure current trials controller items have full test coverage to enable refactoring
  • Simplify current new trial creation methods, using Services if necessary
  • Move create_hand_raise_lead route/action to a new controller
  • Move extend_reactivate action to a new controller or deprecate(not sure if valid anymore)
  • Try to find another way besides using a skip route/action to provide this functionality
  • Move/Remove any other actions that can if they do not contribute to new trial creation directly.
Edited by Doug Stull