[ENG-11873] Delete test campaigns - #11877
Open
Ostap-Zherebetskyi wants to merge 1 commit into
Open
Conversation
Ostap-Zherebetskyi
marked this pull request as ready for review
August 25, 2026 12:22
cslzchen
approved these changes
Aug 25, 2026
cslzchen
left a comment
Collaborator
There was a problem hiding this comment.
⭐ looks good and will merge after the final pair/review
| if notification_campaign.status == NotificationCampaignStatus.RUNNING: | ||
| messages.error(request, 'Cannot delete a running campaign.') | ||
| return redirect('notifications:notification_campaigns_detail', pk=notification_campaign.pk) | ||
| notification_campaign.delete() |
Collaborator
There was a problem hiding this comment.
I think this will cascade delete all the recipients and we don't have to wait for the quarterly clean-up task.
Comment on lines
+200
to
+211
| <form | ||
| id="delete-campaign-form" | ||
| method="post" | ||
| action="{% url 'notifications:notification_campaigns_delete' notification_campaign.id %}" | ||
| style="display:inline;" | ||
| > | ||
| {% csrf_token %} | ||
| <button type="submit" class="btn btn-primary" {% if not delete_allowed %}disabled{% endif %} | ||
| title="Delete the campaign and all associated data."> | ||
| Delete Campaign | ||
| </button> | ||
| </form> |
Collaborator
There was a problem hiding this comment.
Does this also ask for confirmation the same way as when we start a campaign? (I think so)
Comment on lines
+8
to
+17
| <div> | ||
| {% if messages %} | ||
| <ul> | ||
| {% for message in messages %} | ||
| <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }} | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
| {% endif %} | ||
| </div> |
Collaborator
There was a problem hiding this comment.
Is this used to show successful deletion after returning to the list page? (I think so too)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Purpose
Delete test campaigns
Changes
Side Effects
QE Notes
CE Notes
Documentation