Use custom 'Deliverable' item type when creating deliverables

Changes:
- Added DELIVERABLE_ITEM_TYPE_ID config (5793903 for Staging)
- Updated create_deliverable_project() to use customItemTypeId parameter
- Deliverables now created with proper "Deliverable" custom item type
- Results in scope=WsFolder (instead of RbFolder)
- Matches manually created deliverables in Wrike UI

This ensures deliverables display correctly as "Deliverable" type
in the Wrike interface, not generic "Project" type.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Dave Porter 2025-10-20 15:16:24 -04:00
parent 5814c87ae2
commit bd092e75cd

View file

@ -51,10 +51,12 @@ class Config:
# Wrike Space - EDIT FOR DIFFERENT ENVIRONMENTS
WRIKE_SPACE_ID = "MQAAAABpz7l_" # Staging
WRIKE_SPACE_NAME = "Staging"
DELIVERABLE_ITEM_TYPE_ID = "5793903" # Custom item type "Deliverable"
# Production space (uncomment for production)
# WRIKE_SPACE_ID = "MQAAAABoHcTY" # LGL Team
# WRIKE_SPACE_NAME = "LGL Team"
# DELIVERABLE_ITEM_TYPE_ID = "XXXXXX" # Update with production custom item type ID
# Custom field IDs in Wrike
CUSTOM_FIELDS = {
@ -502,8 +504,8 @@ class WrikeMonitor:
if result and "data" in result and len(result["data"]) > 0:
deliverable_id = result["data"][0]["id"]
# Convert to project with dates
project_data = {"project": {}}
# Convert to project with dates and custom item type
project_data = {"project": {"customItemTypeId": Config.DELIVERABLE_ITEM_TYPE_ID}}
if brief_date:
project_data["project"]["startDate"] = brief_date
if live_date: