toga-ai 1.0.285 → 1.0.286

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ project: Worker
6
6
  client: shared
7
7
  type: feature
8
8
  status: active
9
- updated: 2026-06-23
9
+ updated: 2026-07-08
10
10
  owners: ["jcardinal"]
11
11
  files:
12
12
  - worker2/Worker/Clickup.php
@@ -69,8 +69,26 @@ None — internal team/sprint tooling, uniform across clients.
69
69
  - **No PHPUnit harness** in worker2. The regression test
70
70
  `Tests/Worker/ClickupWorkTypeTest.php` is a plain-PHP script (reflection on
71
71
  `isStatusComplete`) run with `php Tests/Worker/ClickupWorkTypeTest.php`.
72
+ - **ClickUp dropdown custom-field `value` is the option ORDERINDEX, not its name.** The
73
+ webhook payload for a dropdown/labels custom field delivers the selected option's integer
74
+ `orderindex`, *not* the option's display name. Any name-keyed lookup (e.g.
75
+ `$lookupPreviousSprintWorkTypeByName`) will silently never match if fed the raw `value`.
76
+ Resolve the name first via the field's own `type_config->options` — build a map keyed by
77
+ `orderindex` (`$workTypesByIndex[$opt->orderindex] = $opt`) and read `->name` from it. This
78
+ is the proven pattern in `_Worker_Team_Sprint::SprintLock` (`Worker/Team/Sprint.php`, the
79
+ Work Type resolve ~L3894 and the POST ~L3971). Guard the lookup with
80
+ `isset($workTypesByIndex[$value])` so a stale/deleted option orderindex doesn't warn.
72
81
 
73
82
  ## Change history
83
+ - 2026-07-08 — Fixed **Previous Sprint Work Type** never being set on tasks created after a
84
+ sprint launched (`taskCreated` case, `Worker/Clickup.php` ~L715-751). Root cause: the handler
85
+ assigned `$workType = $customField->value` (the ClickUp option orderindex, an int) then looked
86
+ it up in a name-keyed map, so the `isset()` guard never matched and the POST silently never
87
+ fired. Now resolves orderindex→name via the WORKTYPE field's `type_config->options`
88
+ (`$workTypesByIndex`), matching the `SprintLock` convention, with an added
89
+ `isset($workTypesByIndex[$value])` guard. Also added: empty Work Type now defaults to
90
+ `Unplanned` before the Previous Sprint Work Type lookup so newly-created tasks still get a
91
+ value. `php -l` clean; php-reviewer approved. (jcardinal)
74
92
  - 2026-06-23 — Fixed dependents staying Conditional after a blocker completed: completion check
75
93
  now treats `closed` as terminal alongside `done`, and `taskStatusUpdated` re-evaluates
76
94
  dependents (gated to terminal statuses). Added `COMPLETE_STATUS_TYPES`, `isStatusComplete()`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.285",
3
+ "version": "1.0.286",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",