From f2fcaf65ef05f7b16de6d50b74d787f2ca9c299d Mon Sep 17 00:00:00 2001 From: DJP Date: Thu, 30 Oct 2025 15:42:57 -0400 Subject: [PATCH] Add default Box folder ID and re-enable working field updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UI Changes: - Box Folder ID input now defaults to: 348526703108 - Pre-filled but still editable - Saves time re-entering same folder Field Updates RE-ENABLED (confirmed working): 1. ARTESIA.FIELD.ASSET DESCRIPTION - Set to subject_title from V2 filename - Example: "TEST-JOB11" 2. FERRERO.FIELD.STATE - Force to "Local" for all uploads - Valid domain value (Global/Local) 3. MAIN_LANGUAGES - Set from V2 filename language_code - Example: "de" → "DE" Field Updates KEPT DISABLED: - FERRERO.MARKETING.CREATOR - "Oliver Agency" is invalid (not in 1,893 domain values) - Keeping master value to avoid validation failure - Valid options: "ExternalAgency", "ExternalAgencynew" Video Metadata: - Extracted via ffprobe (width, height, duration, bitrate) - Logged for reference - Not sent to DAM (DAM analyzes automatically) Result: ✅ Default folder ID saves time ✅ Description from filename ✅ State always Local ✅ Language from filename ✅ All uploads should work 🤖 Generated with Claude Code --- src/MetadataExtractorMVP.php | 30 ++++-------------------------- workflow_v3.php | 1 + 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/src/MetadataExtractorMVP.php b/src/MetadataExtractorMVP.php index c25e105..b2244f5 100644 --- a/src/MetadataExtractorMVP.php +++ b/src/MetadataExtractorMVP.php @@ -308,8 +308,6 @@ class MetadataExtractorMVP } // 4. Update ARTESIA.FIELD.ASSET DESCRIPTION from filename subject_title - // TEMPORARILY DISABLED - Testing if this causes upload failure - /* if ($parsedFilename && !empty($parsedFilename['subject_title'])) { $description = $parsedFilename['subject_title']; foreach ($mvpFields as &$field) { @@ -324,11 +322,8 @@ class MetadataExtractorMVP } } } - */ - // 5. Force FERRERO.FIELD.STATE to "Local" for all uploads - // TEMPORARILY DISABLED - Testing if this causes upload failure - /* + // 5. Force FERRERO.FIELD.STATE to "Local" for all uploads (valid domain value) foreach ($mvpFields as &$field) { if ($field['id'] === 'FERRERO.FIELD.STATE') { if (isset($field['value']['value']['value'])) { @@ -340,7 +335,6 @@ class MetadataExtractorMVP break; } } - */ // 6. Update video technical metadata if available if (!empty($videoMetadata)) { @@ -348,28 +342,12 @@ class MetadataExtractorMVP // Let DAM analyze video files automatically - don't send technical metadata } - // 7. CREATOR field - TEMPORARILY DISABLED + // 7. CREATOR field - DISABLED (causes upload failure) // "Oliver Agency" is NOT in the domain values (1893 specific emails/usernames) // Valid values include: "ExternalAgency", "ExternalAgencynew" - // Commenting out until we confirm which value to use - /* - $creatorFieldIndex = null; - foreach ($mvpFields as $index => &$field) { - if ($field['id'] === 'FERRERO.MARKETING.CREATOR') { - $creatorFieldIndex = $index; - // Update existing field - if (isset($field['value']['value']['value'])) { - $field['value']['value']['value'] = 'ExternalAgency'; // Valid domain value - } elseif (isset($field['value']['value']['field_value']['value'])) { - $field['value']['value']['field_value']['value'] = 'ExternalAgency'; - } - error_log("MVP Extractor: Updated CREATOR to: ExternalAgency"); - break; - } - } - */ + // Leaving this field from master as-is to avoid validation errors - error_log("MVP Extractor: Field updates temporarily disabled for testing"); + error_log("MVP Extractor: Field updates applied - Description, State, Language"); return $mvpFields; } diff --git a/workflow_v3.php b/workflow_v3.php index 12a5ca3..7dbf48c 100644 --- a/workflow_v3.php +++ b/workflow_v3.php @@ -2954,6 +2954,7 @@ $envInfo = $configV3->getEnvironmentInfo();