Defect #43889
closedWebhook is not triggered when attachment is deleted via AJAX UI
Description
Webhook functionality was introduced in #29664. However, when an attachment is deleted via the AJAX-based UI (trash icon), a journal entry is created with attachment removal details, but no webhook event is triggered.
In contrast, deleting an attachment via issue edit and submit creates a similar journal entry and correctly triggers a webhook.
This results in inconsistent webhook behavior depending on how the attachment is removed, even though both actions produce equivalent journal entries.
Expected behavior¶
A webhook event should be triggered whenever a journal entry is created for attachment deletion, regardless of whether it is performed via AJAX or issue update.
Files
Related issues
Updated by Go MAEDA 1 day ago
- File 43889-fix-webhook-when-attachment-deleted.patch 43889-fix-webhook-when-attachment-deleted.patch added
The problem happens because deleting an attachment with the AJAX trash icon does not save the issue itself. It only saves a journal entry, so the issue's after_update_commit callback does not run and no issue.updated webhook is sent.
This patch triggers issue.updated when an attachment is removed through this journal-only path.
Could you please try this patch and let me know if it fixes the problem on your side?
Updated by Go MAEDA 1 day ago
- Related to Feature #29664: Webhook triggers in Redmine added
Updated by Marius BĂLTEANU 1 day ago
- Status changed from New to Resolved
- Assignee set to Marius BĂLTEANU
- Resolution set to Fixed
Thanks!
Updated by Yasu Saku about 18 hours ago
I confirmed the webhook works correctly when clicking the trash icon.
Thank you so much.
Updated by Marius BĂLTEANU about 18 hours ago
- Status changed from Resolved to Closed