fix(promotions): include campaign.budget.type in status_display requiredFields - #16251
fix(promotions): include campaign.budget.type in status_display requiredFields#16251okxint wants to merge 1 commit into
Conversation
|
|
Thanks for the contribution! We need more information before reviewing this further. Correctly fixes a missing field in the Promotion status_display computed column that caused promotions with per-attribute budgets to be incorrectly marked as expired. The one-line change is well-reasoned and targeted. However, the PR body replaces the required template with free-form prose — the Testing section is absent — and no changeset is included. Triggered by: new PR opened |
The
status_displaycomputed column forPromotionlistsrequiredFieldsthat drive the API
fields=query. It requestscampaign.budget.limitandcampaign.budget.usedbut omitscampaign.budget.type.getPromotionStatus()checksbudget.typeto decide whether to skip theexhausted-budget check for
use_by_attribute/spend_by_attributebudgettypes. Because
typeis never fetched, it receivesundefined, fallsthrough to the
overBudgetbranch, and marks otherwise-active promotionsas "Campaign expired".
Adding
campaign.budget.typetorequiredFieldsensures the type isavailable when
getPromotionStatus()evaluates the promotion status.