Skip to content

Commit a18f586

Browse files
committed
fix: resolve time estimate support issues in task updates by simplifying validation and enhancing error handling
1 parent 843783e commit a18f586

File tree

3 files changed

+35
-63
lines changed

3 files changed

+35
-63
lines changed

changelog.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## v0.7.2 (2025-04-25)
4+
5+
### 🛠️ Bug Fixes
6+
7+
- Fixed time estimate support in task updates:
8+
- Removed redundant field-specific validation check in task update operations
9+
- Simplified validation to check only for the presence of update fields
10+
- Fixed "At least one field to update must be provided" error when using time_estimate
11+
- Added time string parsing for converting formats like "2h 30m" to minutes
12+
- Improved tool description for clear guidance on supported formats
13+
- Ensures compatibility with all fields defined in the UpdateTaskData type
14+
15+
### 🔗 References
16+
17+
- #45: [Bug: Time estimates not allowed when updating tasks](https://github.com/taazkareem/clickup-mcp-server/issues/45)
18+
319
## v0.7.1 (2025-04-24)
420

521
### 🚀 New Features & Improvements

release-notes.md

Lines changed: 14 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,23 @@
1-
# v0.7.0 Release Notes (2025-04-24)
2-
3-
## 🚀 New Features & Improvements
4-
5-
- Added Documents Module with comprehensive capabilities:
6-
7-
- Complete document lifecycle management (create, list, search, update)
8-
- Page-level operations for creating and modifying document content
9-
- Optional activation via `DOCUMENT_SUPPORT=true` environment variable
10-
- Full compatibility with ClickUp API V3 for document operations
11-
- Seamless integration with existing workspace navigation
12-
- Added Time Tracking Suite with comprehensive tools:
13-
14-
- View and manage time entries for tasks with flexible filtering
15-
- Start/stop time tracking with one command
16-
- Add manual time entries with natural language duration support
17-
- Track billable and non-billable time
18-
- Delete unwanted time entries
19-
- Monitor currently running timers across workspace
20-
- Added Command Disabling Capability:
21-
22-
- Selective tool access via `DISABLED_TOOLS` environment variable
23-
- Comma-separated command list for granular control
24-
- Compatible with both environment variables and command line arguments
25-
- Clear error messages when attempting to use disabled commands
26-
- Enhanced security for production deployments
27-
28-
## 🛠️ Bug Fixes & Improvements
29-
30-
- Fixed custom task ID lookup in `getTaskByCustomId` method:
31-
- Corrected API endpoint from `/task/custom_task_ids` to `/task/{id}` with proper parameters
32-
- Added required `custom_task_ids=true` and `team_id` parameters for proper authentication
33-
- Fixed "Authorization failed" error when retrieving tasks by custom ID
34-
- Improved error handling and logging for custom ID operations
35-
36-
- Fixed JSON schema compatibility issues for third-party integrations
37-
- Enhanced custom field handling in task update operations
38-
- Improved error handling and validation across all new tools
39-
- Optimized response formatting for consistent output
1+
# v0.7.2 Release Notes (2025-04-25)
402

41-
## 📦 Dependencies
3+
## 🛠️ Bug Fixes
424

43-
- No dependency changes in this release
5+
- Fixed time estimate support in task updates:
6+
- Removed redundant field-specific validation check in task update operations
7+
- Simplified validation to check only for the presence of update fields
8+
- Fixed "At least one field to update must be provided" error when using time_estimate
9+
- Added time string parsing for converting formats like "2h 30m" to minutes
10+
- Improved tool description for clear guidance on supported formats
11+
- Ensures compatibility with all fields defined in the UpdateTaskData type
4412

45-
## 🔄 Repository Updates
13+
## 📦 Dependencies
4614

47-
- Comprehensive documentation updates for all new features
48-
- Enhanced API reference with examples for document and time tracking operations
49-
- Added configuration guides for new environment variables
50-
- Improved tool descriptions and parameter documentation
15+
- No dependency changes in this release
5116

5217
## 🙏 Thank You
5318

54-
Special thanks to our contributors who made this release possible:
19+
Special thanks to our contributors who reported and helped fix this issue:
5520

56-
- [@jsb989](https://github.com/jsb989) - Document support implementation
57-
- [@quitequinn](https://github.com/quitequinn) - Time tracking functionality
58-
- [@somework](https://github.com/somework) - Command disabling feature
59-
- [@Nemo64](https://github.com/Nemo64) - JSON schema compatibility improvements
60-
- [@FruitSwimer](https://github.com/FruitSwimer) - Custom field update fixes
21+
- [@m-roberts](https://github.com/m-roberts) - Reporting and suggesting fix for the time estimate update issue
6122

62-
Your contributions have significantly improved the ClickUp MCP Server!
23+
Your feedback helps make ClickUp MCP Server better for everyone!

src/tools/task/utilities.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,6 @@ export function validateListIdentification(listId?: string, listName?: string):
171171
* Ensures at least one update field is provided
172172
*/
173173
export function validateTaskUpdateData(updateData: any): void {
174-
// Check if there are any valid update fields present
175-
const hasUpdates = Object.keys(updateData).some(key => {
176-
return ['name', 'description', 'markdown_description', 'status', 'priority',
177-
'dueDate', 'startDate', 'custom_fields', 'time_estimate'].includes(key);
178-
});
179-
180-
if (!hasUpdates) {
181-
throw new Error("At least one field to update must be provided");
182-
}
183-
184174
// Validate custom_fields if provided
185175
if (updateData.custom_fields) {
186176
if (!Array.isArray(updateData.custom_fields)) {
@@ -193,6 +183,11 @@ export function validateTaskUpdateData(updateData: any): void {
193183
}
194184
}
195185
}
186+
187+
// Ensure there's at least one field to update
188+
if (Object.keys(updateData).length === 0) {
189+
throw new Error("At least one field to update must be provided");
190+
}
196191
}
197192

198193
/**

0 commit comments

Comments
 (0)