ferrero-opentext/Python-Version/scripts/shared
DJP 631dba4390 Fix campaign ID storage - always set local_campaign_id
Critical Fix:
- extract_global_campaign_reference() now accepts campaign_id parameter
- Always sets local_campaign_id to current campaign as fallback
- Prevents NULL local_campaign_id when no Global Campaign Reference exists

Root Cause:
- Assets without Global Campaign Reference had NULL local_campaign_id
- Caused derivatives to be linked to wrong campaigns
- Same asset in multiple campaigns would share tracking IDs incorrectly

Impact:
- Every asset now has proper local_campaign_id
- Derivatives correctly linked to their source campaign
- Fixes issue where C000001177 assets were showing as C000002098

Changes:
- database.py: Added campaign_id parameter with fallback logic
- a1_to_a2_box_uploader.py: Pass campaign_number to function
- a5_to_a6_download.py: Pass campaign_number to function
2025-12-22 11:37:58 -05: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 Add support for loading environment-specific .env files (prod/dev) 2025-11-26 15:44:09 -05:00
dam_client.py Fix folder detection for folders with periods (v2) 2025-12-17 13:14:59 -05:00
database.py Fix campaign ID storage - always set local_campaign_id 2025-12-22 11:37:58 -05:00
filename_parser.py Update filename parser to V2.1 structure with new field positions 2025-11-13 13:41:19 -05: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 Fix date field type error for ASSET VALIDITY START/END PERIOD 2025-12-19 23:02:55 -05:00
notifier.py Fix A2→A3 email template and database logging issues 2025-12-22 10:12:36 -05:00