[PR #1467] [MERGED] Enable hostname filtering for bulk agents deletion #3811

Closed
opened 2026-03-14 07:40:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amidaware/tacticalrmm/pull/1467
Author: @Supermanu
Created: 3/30/2023
Status: Merged
Merged: 4/7/2023
Merged by: @wh1te909

Base: developHead: bulk_delete_agents_hostname


📝 Commits (2)

  • 59dcdd5 Enable hostname filtering for bulk delete agents
  • 376f636 Enable combination of filters for bulk agents deletion

📊 Changes

1 file changed (+21 additions, -11 deletions)

View changed files

📝 api/tacticalrmm/agents/management/commands/bulk_delete_agents.py (+21 -11)

📄 Description

Hey,
From time to time we need to replace a batch of computers and we need to remove the old agents in tacticalrmm. As they all start with the same hostname, this commit enables filtering them for deletion by hostname.

On a side note, it would be nice (for me) to use multiple filter at once, days and hostname for instance. I see that there are some optimizations going on and didn't suggest code changes. What I could submit, is to use a .filter() on the QuerySet for all the arguments except for the agentver which would remain unchanged. If this make sense, let me know and I will submit another PR.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amidaware/tacticalrmm/pull/1467 **Author:** [@Supermanu](https://github.com/Supermanu) **Created:** 3/30/2023 **Status:** ✅ Merged **Merged:** 4/7/2023 **Merged by:** [@wh1te909](https://github.com/wh1te909) **Base:** `develop` ← **Head:** `bulk_delete_agents_hostname` --- ### 📝 Commits (2) - [`59dcdd5`](https://github.com/amidaware/tacticalrmm/commit/59dcdd5393cd16efe347ba5af5a9524fefb57bd8) Enable hostname filtering for bulk delete agents - [`376f636`](https://github.com/amidaware/tacticalrmm/commit/376f6369b84439a9050d9e4fe8af8d5da2c69a2c) Enable combination of filters for bulk agents deletion ### 📊 Changes **1 file changed** (+21 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `api/tacticalrmm/agents/management/commands/bulk_delete_agents.py` (+21 -11) </details> ### 📄 Description Hey, From time to time we need to replace a batch of computers and we need to remove the old agents in tacticalrmm. As they all start with the same hostname, this commit enables filtering them for deletion by hostname. On a side note, it would be nice (for me) to use multiple filter at once, days and hostname for instance. I see that there are some optimizations going on and didn't suggest code changes. What I could submit, is to use a `.filter()` on the `QuerySet` for all the arguments except for the `agentver` which would remain unchanged. If this make sense, let me know and I will submit another PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 07:40:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#3811
No description provided.