Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task]: Read promoted group properties for multiple promoted groups #15350

Open
1 task
KevinMind opened this issue Feb 11, 2025 · 0 comments · May be fixed by mozilla/addons-server#23082
Open
1 task

[Task]: Read promoted group properties for multiple promoted groups #15350

KevinMind opened this issue Feb 11, 2025 · 0 comments · May be fixed by mozilla/addons-server#23082
Assignees
Labels
repository:addons-server Issue relating to addons-server

Comments

@KevinMind
Copy link
Contributor

KevinMind commented Feb 11, 2025

Description

To support multiple PromotedGroup per PromtedAddonPromotion in order to query the details of the aggregate promoted groups we need an interface that will return the correct data depending on both the property being queried and the set of PromotedGroups associated with the addon.

Example interface could look like

addon = Addon.objects.get(pk=1)
# Get the promoted addon search bump should return the highest value for all Promoted groups
addon.promotedaddon.properties(currently_approved=True).search_ranking_bump
# Effectively the same as this
max(PromotedGroup.objects.filter(addon=addon).values_list('search_ranking_bump'))
# Though it's a bit more complicated with `currently_approved` which would have to get PromotedGroup via PromotedAddonVersion
max(PromotedAddonVersion.objects.filter(version=addon.current_version).values_list('promoted_group__search_ranking_bump'))

Acceptance Criteria

Milestones/checkpoints

Preview Give feedback

Checks

  • If I have identified that the work is specific to a repository, I have removed "repository:addons-server" or "repository:addons-frontend"

┆Issue is synchronized with this Jira Task

@KevinMind KevinMind added the repository:addons-server Issue relating to addons-server label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repository:addons-server Issue relating to addons-server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants