diff --git a/kitsune/questions/models.py b/kitsune/questions/models.py index 2345b4d415d..50f0432c739 100755 --- a/kitsune/questions/models.py +++ b/kitsune/questions/models.py @@ -319,6 +319,7 @@ def handle_metadata_tags(self, action): # beta exists. A bare version is tagged only if it's a known # major/stability release. match = re.match(r"(\d+(?:\.\d+){0,2})([ab]\d*)?", raw_version) + sanitized_product_version = "" if match: version, suffix = match.group(1), match.group(2) if "." not in version: @@ -327,14 +328,17 @@ def handle_metadata_tags(self, action): if suffix: if any(key.startswith(f"{version}b") for key in development_releases): + sanitized_product_version = f"{version}b" tags.append(f"{product_name} {version}") if tenths and tenths != version: tags.append(f"{product_name} {tenths}") tags.append("beta") elif version in major_releases or version in stability_releases: + sanitized_product_version = version tags.append(f"{product_name} {version}") if tenths and tenths != version: tags.append(f"{product_name} {tenths}") + self.add_metadata(sanitized_product_version=sanitized_product_version) # Add a tag for the OS but only if it already exists as a non-segmentation tag. if os := self.metadata.get("os"): diff --git a/kitsune/sumo/jinja2/sumo/includes/question_entry.html b/kitsune/sumo/jinja2/sumo/includes/question_entry.html index 0bdeb6cc49c..2a033a5088c 100644 --- a/kitsune/sumo/jinja2/sumo/includes/question_entry.html +++ b/kitsune/sumo/jinja2/sumo/includes/question_entry.html @@ -188,6 +188,7 @@