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

Expose segmentation tags in moderation #6360

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

akatsoulas
Copy link
Collaborator

No description provided.


question = get_object_or_404(Question, pk=question_id)
if tag_ids:
sumo_tags = SumoTag.objects.filter(id__in=tag_ids)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be limited only to segmentation tags

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a custom manager to return non-archived tags that start with seg-

Copy link
Contributor

@escattone escattone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nits to consider, but it looks good! Thanks @akatsoulas!

@@ -7,7 +7,12 @@
<hgroup>
<h2 class="sumo-card-heading">{{ _('Flagged {t} (Reason: {r})')|f(t=object.content_type, r=object.get_reason_display()) }}</h2>
{% if object.notes %}
<p class="notes">{{ _('Other reason:') }} {{ object.notes }}</p>
{% if object.content_type.model == 'question' %}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. Remove this empty line?

<p class="notes">{{ _('Other reason:') }} {{ object.notes }}</p>
{% if object.content_type.model == 'question' %}

<p class="notes">{{ _('Additional notes:') }}<a target="_blank" href="{{ object.content_object.get_absolute_url() }}">{{ object.notes }}</a></p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. Add space before link.

image
const url = `/en-US/questions/${questionId}/add-tag-async`;
const response = await fetchData(url, { method: 'POST', body: { tags: selectedTags } });
if (response) {
console.log(response.message);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. Is this a leftover from debugging?

@akatsoulas akatsoulas force-pushed the seg-tags-moderation-tool branch from 0710e3e to 9033d1f Compare November 20, 2024 07:45
@akatsoulas akatsoulas force-pushed the seg-tags-moderation-tool branch from 9033d1f to 382b6f8 Compare November 20, 2024 08:10
@akatsoulas akatsoulas merged commit 03b735d into mozilla:main Nov 20, 2024
2 checks passed
@akatsoulas akatsoulas deleted the seg-tags-moderation-tool branch November 20, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants