attaching plans to goals

Issue #368 on hold
Gregory Smith created an issue

If I set two training goals for the same day, I am not sure which goal I am attaching the trainiong plan to. For example, I have two goals that I want to target for the beginning of the OTW season, which I define as April 1st. One is to weigh 195lbs. The other is to improve performance on erg benchmarks.

When I go to defining the plan, I see Screen Shot 2018-10-30 at 3.14.58 PM.png Can goals be numbered or somehow uniquely identified to align them with plans?

Comments (7)

  1. Sander Roosendaal repo owner

    The "unicode" or "string" representation of a training target was defined as '{owner} {goal date} {goal name}". I propose to redefine it as "{goal id} {goal name} {goal date} {owner}" to get the most important information in view even for smaller select buttons. BTW, "owner" is the "manager" of the goal. A goal can be used for a group of athletes.

    Question: Do you think we should be able to link a plan to multiple goals? Or do you agree that that should be one composite goal, potentially with milestones along the way?

  2. Gregory Smith reporter

    @sanderroosendaal I'd prefer to be able to link a plan to multiple goals. (ie weight loss as one goal and 2k time as another)

  3. Sander Roosendaal repo owner

    @gregsmith01748 Is it worth the database change? I can do that but would either lose all existing links or have to do it in a 2 step approach with disposable code to manage all existing links

  4. Sander Roosendaal repo owner

    Currently Goals and Plans are related in a one-to-many way, i.e. a plan can have only one goal but a goal can be implemented in multiple plans, i.e. each member of a crew can have a personalized plan but together they have the same goal (qualify for Olympics, e.g.).

    We can change this to a Many-to-Many relationship, but it will become a bit messy. Currently, I am doing some checks on goal end date related to the goal. If we go to a many-to-many relationship, I will probably drop these checks completely in order to keep the code simple. That allows for future plans to related to past goals, etc, and it will be the responsibility of the user to manage this.

  5. Sander Roosendaal repo owner

    Another use case for allowing multiple plans to relate to one goal is when you are preparing an alternative plan leading to the same goal

  6. Gregory Smith reporter

    @sanderroosendaal it's not a big deal. With current functionality, the use model would be to put all aspects of a goal for a date in the notes for the goal.

  7. Log in to comment