Webhook sends wrong "assigned to" user in issue assigned change triggered message. #5778

Closed
opened 2025-11-02 06:35:41 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @chriseaton on GitHub (Jul 23, 2020).

  • Gitea version (or commit ref): 1.12.2
  • Git version: 1.8.3.1
  • Operating system: CentOS 7
  • Database (use [x]):
    • PostgreSQL
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes

Description

Likely a similar issue as #11295, the webhook (tested on Slack) sends the the incorrect user name of whom the issue is assigned to, instead it sends the user name of the user making the change.

Let's say user john.smith...

  1. assigns user jane.doe.
  2. unassigns himself from issue "Need to upgrade to ES6".

The webhooks will send a message not even mentioning jane.doe - example output:

[code/sample-nodejs] Issue assigned to john.smith: # 2 Need to upgrade to ES6. by john.smith
[code/sample-nodejs] Issue unassigned: # 1 Need to upgrade to ES6. by john.smith

Expected result:
A webhook message is sent saying:

[code/sample-nodejs] Issue assigned to jane.doe: # 2 Need to upgrade to ES6. by john.smith
[code/sample-nodejs] Issue unassigned: # 1 Need to upgrade to ES6. by john.smith

Originally created by @chriseaton on GitHub (Jul 23, 2020). - Gitea version (or commit ref): 1.12.2 - Git version: 1.8.3.1 - Operating system: CentOS 7 - Database (use `[x]`): - [x] PostgreSQL - Can you reproduce the bug at https://try.gitea.io: - [x] Yes ## Description Likely a similar issue as #11295, the webhook (tested on Slack) sends the the incorrect user name of whom the issue is assigned to, instead it sends the user name of the user making the change. Let's say user john.smith... 1. assigns user jane.doe. 2. unassigns himself from issue "Need to upgrade to ES6". The webhooks will send a message not even mentioning jane.doe - example output: > [code/sample-nodejs] Issue assigned to **john.smith**: # 2 Need to upgrade to ES6. by john.smith > [code/sample-nodejs] Issue unassigned: # 1 Need to upgrade to ES6. by john.smith **Expected result:** A webhook message is sent saying: > [code/sample-nodejs] Issue assigned to **jane.doe**: # 2 Need to upgrade to ES6. by john.smith > [code/sample-nodejs] Issue unassigned: # 1 Need to upgrade to ES6. by john.smith
Author
Owner

@stale[bot] commented on GitHub (Oct 12, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Oct 12, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@zeripath commented on GitHub (Oct 12, 2020):

Does this still happen?

If so it likely needs a similar fix to my other recent PR - we need to set the assignee before we send the webhook.

@zeripath commented on GitHub (Oct 12, 2020): Does this still happen? If so it likely needs a similar fix to my other recent PR - we need to set the assignee before we send the webhook.
Author
Owner

@chriseaton commented on GitHub (Oct 21, 2020):

Yes - still happens!

@chriseaton commented on GitHub (Oct 21, 2020): Yes - still happens!
Author
Owner

@wxiaoguang commented on GitHub (Apr 29, 2022):

IIRC there were more fixes to this this problem. Feel free to reopen if the bug still exists.

@wxiaoguang commented on GitHub (Apr 29, 2022): IIRC there were more fixes to this this problem. Feel free to reopen if the bug still exists.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5778