Skip to content

Slack Project Updates: issue webhook ignores project_id, posts to wrong channel #8806

@Fizmatik

Description

@Fizmatik

Bug Description

When multiple Slack Project Update connections are configured (different projects → different Slack channels), the handleIssueWebhook in the silo service sends work item state change notifications to the wrong channel.

Steps to Reproduce

  1. Configure Slack integration with two Project Update mappings:
    • Project A → #channel-a
    • Project B → #channel-b
  2. Create a work item in Project B
  3. Change state to Done

Expected: Notification goes to #channel-b
Actual: Notification goes to #channel-a (the first entity connection returned)

Root Cause

In handleIssueWebhook (silo), the query to find the project entity connection does not filter by project_id:

const [projectEntityConnection] = await integrationConnectionHelper.getWorkspaceEntityConnections({
    workspace_connection_id: workspaceConnection.id,
    entity_type: E_SLACK_ENTITY_TYPE.SLACK_PROJECT_UPDATES
});

This returns ALL SLACK_PROJECT_UPDATES connections and destructures [0] — the first one, regardless of which project the work item belongs to.

Fix

Filter the result by the payload's project:

const allConnections = await integrationConnectionHelper.getWorkspaceEntityConnections({
    workspace_connection_id: workspaceConnection.id,
    entity_type: E_SLACK_ENTITY_TYPE.SLACK_PROJECT_UPDATES
});
const projectEntityConnection = allConnections.find(c => c.project_id === payload.project) || null;

Or better — add project_id as a filter parameter to getWorkspaceEntityConnections.

Additional Context

Note: the handleProjectUpdateWebhook function (the project_update worker) correctly filters by project. The bug is only in the issue worker path.

Version: Plane Commercial, silo service

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions