Project

General

Profile

Actions

WhiteBoard Party #122

open

converting hard commitments to soft commitments

Added by Sam Pearson 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/25/2026
Due date:
% Done:

0%

Estimated time:
App Component:
Feature:

Description

You can just blank out the due date of a hard commitment, effectively turning it into a soft commitment.

Certainly possible to add some validation to prevent this:

    if "due_at" in data:
        if data["due_at"] is None:
            if "timeframe_id" not in data:
                commitment = service.get(user_id=user_id, commitment_id=commitment_id)
                if commitment.timeframe_id is None:
                    return ({ 'error': f"Hard commitments cannot exist without a due_at date."
                                       f"add timeframe_ID to remove the due_at"}, 400)
            # # Clear due_at using dedicated method
            # updated = service.clear_due_at(user_id=user_id, commitment_id=commitment_id)
            # if not updated:
            #     return ("", 404)

Except that a hard commitment has a timeframe ID - the day of the due date.

It's probably best to allow freeform changes like implicitly turning a hard commitment into a soft commitment, there's really not much of a difference, but it may be worth considering whether to allow it or maybe force an explicit endpoint or something.

No data to display

Actions

Also available in: Atom PDF