Skip to content

Feature/objective key results per set - #17

Merged
MarkJYoung merged 3 commits into
mainfrom
feature/objective-key-results-per-set
Oct 9, 2026
Merged

MarkJYoung merged 3 commits into
mainfrom
feature/objective-key-results-per-set

Conversation

@MarkJYoung

Copy link
Copy Markdown
Contributor

No description provided.

MarkJYoung and others added 3 commits October 9, 2026 12:11
A durable objective can already carry key results in different sets (its period
lives on KeyResult.objective_set) and the gantt draws them in one swim lane. But
the objective edit page treated it as single-set: KRs were listed flat and new
ones all inherited the objective's primary set, so you couldn't see or change
which period a KR belonged to.

- Give each key-result row a 'Set / timeframe' picker, scoped to the objective's
  team (a KR's period must be one of that team's sets) and labelled with the
  period dates. The KR's current set stays selectable so editing never drops it.
- New rows default to the set being authored under; saving keeps each KR on its
  chosen set, so adding a KR in another set applies the objective to that period.
- Show each KR's set as a pill on the read-only objective page too.

This completes 'reuse objectives across sets': administer one long-lived
objective and give it different key results set to set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Durable objectives were still effectively single-set: the top of the objective
form was a single 'Set' dropdown (the legacy Objective.objective_set FK), and
'which objectives belong to a set' was read from that FK. So an objective could
only sit in one planning period at the objective level.

- Add an Objective.sets M2M (membership) and backfill it from each objective's
  legacy set plus the distinct sets its key results already sit in, so nothing
  moves or disappears. The single FK is kept as a 'primary' pointer for
  breadcrumbs/nav only.
- The top-of-form control becomes a team-scoped checkbox multi-select, so one
  long-lived objective can belong to several sets and show as one lane across
  periods. Creating under a set makes it a member; a set that holds a key result
  stays a member even if unticked.
- Point every 'objectives in this set' read (set page, team cards, group-roadmap
  sourcing, roadmap header pills, objective list) at the new M2M; set/team pages
  keep their existing union with key-result-implied membership.
- Expose Objective.sets in the admin.

Migrations 0028 (schema) + 0029 (backfill) are additive and non-destructive;
dry-run on a prod copy before deploy per docs/dry-run.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
main gained fix/objective-set-own-team and feature/archive-delete-roadmaps since
this branch was cut, so:

- Renumber the migrations to sit after main's 0028_roadmap_archived, keeping a
  single linear history (0029_objective_sets_m2m, 0030_backfill_objective_sets) —
  no merge migration needed.
- Drop ObjectiveSetScopingTests: it asserted on ObjectiveForm's single
  'objective_set' dropdown, which this feature replaces with the 'sets' M2M
  checkbox. The same 'own-team-only' guarantee is now covered by
  MultiSetMembershipTests (sets picker scoped to the team).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@MarkJYoung
MarkJYoung merged commit 5a14830 into main Oct 9, 2026
1 check passed
@MarkJYoung
MarkJYoung deleted the feature/objective-key-results-per-set branch October 9, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant