Conversation
…erarchy, and linked items Add widget parameters for create/update actions: - Free tier: startDate, dueDate, parentId, childrenIds, timeEstimate, timeSpent, timeSpentAt, timeSpentSummary - Premium: isFixed, weight, iterationId, progressCurrentValue - Ultimate: healthStatus, color Add new actions for work item relationships: - add_link: create BLOCKS/IS_BLOCKED_BY/RELATES_TO links between items - remove_link: remove relationship links GraphQL layer updates: - Add WORK_ITEM_ADD_LINKED_ITEMS and WORK_ITEM_REMOVE_LINKED_ITEMS mutations - Extend UPDATE_WORK_ITEM response with all widget fragments - Fix WorkItemLinkedItemsWidget interface to include linkType field - Add WorkItemIterationWidget and WorkItemTimelog interfaces - Add Iteration to GID entity types Fix tier matrix: LINKED_ITEMS -> free, COLOR -> ultimate, PROGRESS -> premium Closes #135
Test Coverage ReportOverall Coverage: 93.34%
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Extends the manage_work_item tool to support additional work item widget fields (dates, hierarchy, time tracking, progress, color, iteration/weight/health) and adds new actions to link/unlink work items via dedicated GraphQL mutations, alongside a corrected tier availability matrix.
Changes:
- Added
add_link/remove_linkactions and expandedcreate/updateinputs to cover more widget-backed fields. - Extended GraphQL types and mutations (including linked-item mutations) and expanded the update response to include additional widget fragments.
- Updated widget tier availability rules (LINKED_ITEMS free, PROGRESS premium, COLOR ultimate) and related unit tests; added Iteration GID support.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/services/WidgetAvailability.test.ts | Updates tier expectations and parameter→widget mapping assertions. |
| src/utils/idConversion.ts | Adds Iteration GID prefix support for ID conversion. |
| src/services/WidgetAvailability.ts | Updates parameter→widget mapping and tier requirements for widgets. |
| src/graphql/workItems.ts | Adds new widget input shapes/types, linked-items node typing, and linked-items mutations; expands update widget fragments. |
| src/entities/workitems/schema.ts | Extends manage_work_item Zod schema with new fields and new actions. |
| src/entities/workitems/registry.ts | Implements new widget input wiring for create/update and adds link/unlink action handlers. |
…ms-extend-manageworkitem-with-date-time
…apping, add unit tests - Throw error when timeSpentAt/timeSpentSummary provided without timeSpent - Remove linkedItemIds from PARAMETER_WIDGET_MAP (linked items use add_link/remove_link actions) - Add 23 unit tests for add_link, remove_link, and all new widget parameters
…anageworkitem-with-date-time' into feat/#135-featworkitems-extend-manageworkitem-with-date-time
…date tests - Add .min(1) to parentId, childrenIds, iterationId in create and update schemas to prevent empty strings producing invalid GIDs - Add unit tests for update with weight, healthStatus, progress, color widgets - Add unit test for create with childrenIds - Add unit test for remove_link with empty workItem response
…e in responses - Add LINKED_ITEMS widget handling to cleanWorkItemResponse: extract simple IDs from nested workItem.id fields - Map GraphQL RELATED linkType back to user-facing RELATES_TO for consistency with add_link/remove_link input schema - Extend GitLabWidget interface with linkedItems typing
|
|
||
| [02:18:39.959] [32mINFO[39m (gitlab-mcp): [36mUsing in-memory session storage (sessions will be lost on restart)[39m |
There was a problem hiding this comment.
The generated TOOLS.md contains a runtime log line with ANSI color codes at the end ([02:18:39.959] INFO ...). This breaks the markdown and will keep changing between runs, creating noisy diffs. Remove this line and adjust the doc generation pipeline to ensure only the markdown output is written (e.g., suppress logger output / write logs to stderr).
| [02:18:39.959] �[32mINFO�[39m (gitlab-mcp): �[36mUsing in-memory session storage (sessions will be lost on restart)�[39m |
| if (parentId !== undefined || (childrenIds !== undefined && childrenIds.length > 0)) { | ||
| createInput.hierarchyWidget = {}; | ||
| if (parentId !== undefined) { | ||
| createInput.hierarchyWidget.parentId = toGid(parentId, "WorkItem"); | ||
| } | ||
| if (childrenIds !== undefined && childrenIds.length > 0) { |
There was a problem hiding this comment.
childrenIds can be passed as an empty array (schema allows it), but this childrenIds.length > 0 guard means the value is silently ignored. Either enforce childrenIds to be non-empty in the Zod schema, or handle “provided but empty” explicitly (pass through if meaningful, or throw a validation error).
| if (parentId !== undefined || (childrenIds !== undefined && childrenIds.length > 0)) { | |
| createInput.hierarchyWidget = {}; | |
| if (parentId !== undefined) { | |
| createInput.hierarchyWidget.parentId = toGid(parentId, "WorkItem"); | |
| } | |
| if (childrenIds !== undefined && childrenIds.length > 0) { | |
| if (parentId !== undefined || childrenIds !== undefined) { | |
| createInput.hierarchyWidget = {}; | |
| if (parentId !== undefined) { | |
| createInput.hierarchyWidget.parentId = toGid(parentId, "WorkItem"); | |
| } | |
| if (childrenIds !== undefined) { |
| if (parentId !== undefined || (childrenIds !== undefined && childrenIds.length > 0)) { | ||
| updateInput.hierarchyWidget = {}; | ||
| if (parentId !== undefined) { | ||
| // null means unlink parent, string means set parent | ||
| updateInput.hierarchyWidget.parentId = | ||
| parentId === null ? null : toGid(parentId, "WorkItem"); | ||
| } | ||
| if (childrenIds !== undefined && childrenIds.length > 0) { |
There was a problem hiding this comment.
On update, childrenIds can be provided as an empty array (schema allows it), but the childrenIds.length > 0 check prevents sending hierarchyWidget.childrenIds, so the request ignores the user input. Align schema + handler behavior (non-empty schema, or pass through/explicitly reject empty arrays).
| if (parentId !== undefined || (childrenIds !== undefined && childrenIds.length > 0)) { | |
| updateInput.hierarchyWidget = {}; | |
| if (parentId !== undefined) { | |
| // null means unlink parent, string means set parent | |
| updateInput.hierarchyWidget.parentId = | |
| parentId === null ? null : toGid(parentId, "WorkItem"); | |
| } | |
| if (childrenIds !== undefined && childrenIds.length > 0) { | |
| if (parentId !== undefined || childrenIds !== undefined) { | |
| updateInput.hierarchyWidget = {}; | |
| if (parentId !== undefined) { | |
| // null means unlink parent, string means set parent | |
| updateInput.hierarchyWidget.parentId = | |
| parentId === null ? null : toGid(parentId, "WorkItem"); | |
| } | |
| if (childrenIds !== undefined) { |
|
🎉 This PR is included in version 6.37.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
startDate/dueDate), time tracking (timeEstimate/timeSpent), hierarchy (parentId/childrenIds), and tier-specific widget parameters tomanage_work_itemcreate/update actionsadd_link/remove_linkactions for work item relationships (BLOCKS/IS_BLOCKED_BY/RELATES_TO)workItemAddLinkedItemsandworkItemRemoveLinkedItemsNew Parameters
Free tier:
startDate,dueDate,parentId,childrenIds,timeEstimate,timeSpent,timeSpentAt,timeSpentSummaryPremium tier:
isFixed,weight,iterationId,progressCurrentValueUltimate tier:
healthStatus,colorNew Actions
add_linkremove_linkTest plan
yarn lint— 0 errorsyarn test— 3743/3743 tests passedyarn build— successfulCloses #135