ferrero-opentext/Python-Version/scripts/shared
nickviljoen 9e92db185a Feature: Apply naming-tool pre-upload metadata overrides on A2→A3 upload
The naming tool's metadata editor saves pre-upload overrides to the
override_metadata table (shared ferrero_tracking DB), but until now the
Python upload pipeline never read from it — every edit was being saved
but never applied to DAM. This wires up the consumer side so user edits
land on the uploaded asset.

- database.py: get_override_metadata() / mark_override_applied(),
  resilient to a missing override_metadata table on dev DBs
- metadata_extractor_mvp.py: OVERRIDE_FIELD_MAP (mirrors the naming
  tool's editor-field → DAM-field-ID map) + _apply_override_fields().
  Applied after master/filename/forced/CreativeX values but before
  asset_type_overrides so EOL/LTD compliance still wins. Empty editor
  values are skipped (leaves inherited value alone). Validity ISO
  dates normalised to MM/DD/YYYY for DAM
- a2_to_a3_upload_polling.py: lookup before building the asset rep,
  pass override_fields into build_mvp_asset_representation, mark
  applied only after confirmed upload success

Override priority: user edit > master metadata > forced defaults >
hardcoded today+365 validity — so the team's per-asset validity
period (e.g. 1 month) now flows through end-to-end.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 12:06:06 +02:00
..
__pycache__ feat: Add systemd services and timers for daily and weekly database backups, introduce a token retrieval script, and update the backup guide documentation. 2025-12-01 22:19:24 -05:00
__init__.py Start Python automation - Foundation components 2025-10-30 16:38:26 -04:00
box_client.py Implement Master Tracking ID validation for A2-A3 uploads 2025-12-06 17:21:38 -05:00
common.py Implement robust Box name sanitization in shared/common.py 2025-12-01 15:23:01 -05:00
config_loader.py Enhancement: Add environment-specific configurations and metadata improvements 2026-01-28 20:41:21 +02:00
dam_client.py Fix: Recurse into subfolders with numeric extensions (e.g. "2.0") 2026-04-10 09:46:32 +02:00
database.py Feature: Apply naming-tool pre-upload metadata overrides on A2→A3 upload 2026-05-19 12:06:06 +02:00
filename_parser.py Feature: Add Spotify (SPT) to social media codes 2026-05-11 21:14:29 +02:00
filename_parser_v1_backup.py Update filename parser to V2.1 structure with new field positions 2025-11-13 13:41:19 -05:00
metadata_extractor_mvp.py Feature: Apply naming-tool pre-upload metadata overrides on A2→A3 upload 2026-05-19 12:06:06 +02:00
metadata_extractor_mvp.py.backup PPR Environment: Use SIMPLE metadata structure for tabular fields 2026-01-23 16:52:50 +02:00
metadata_extractor_mvp_PROD.py Fix: Update MAIN_LANGUAGES values array for tabular fields in DAM upload 2026-03-05 17:26:31 +02:00
notifier.py Enhancement: Capture CreativeX score on B1→B2 global masters 2026-04-29 11:31:07 +02:00