Delete "updated User Note" history for users

Infos:

  • Used Zammad version: 6.4.0
  • Used Zammad installation type: package
  • Operating system: Debian 12
  • Browser + version: Doesn’t matter (server side question)

Expected behavior:

  • We would like to delete only updated User Note history entries for users, as we have now too much notes updates via the API consuming a lot of space and disturbing the human analysis of the users histories.

Actual behavior:

  • Global command History.destroy_all could work but is too large and will destroy all histories within your installation as explained by @MrGeneration here: What exactly does History.destroy_all delete?

  • Not sure it is safe to search into the database to remove only entries with a regexp like /updated User Note/ (so with more text before and after this string)

Steps to reproduce the behavior:

  • Automate user notes updates via the API, after a certain time get to much note updates in users histories, and look for a solution to remove only this kind of history entries without breaking other history entries.

I’ll say this here once again.
Do not fiddle in Zammads database directly.

I do not recommend to remove the ticket history at all.