Project

General

Profile

Actions

Defect #43889

closed

Webhook is not triggered when attachment is deleted via AJAX UI

Added by Yasu Saku 1 day ago. Updated about 18 hours ago.

Status:
Closed
Priority:
Normal
Category:
Webhooks
Target version:
-
Resolution:
Fixed
Affected version:

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

Related to Redmine - Feature #29664: Webhook triggers in RedmineClosedMarius BĂLTEANUActions
Actions #1

Updated by Go MAEDA 1 day ago

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?

Actions #2

Updated by Go MAEDA 1 day ago

Actions #3

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!

Actions #4

Updated by Yasu Saku about 18 hours ago

I confirmed the webhook works correctly when clicking the trash icon.
Thank you so much.

Actions #5

Updated by Marius BĂLTEANU about 18 hours ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF