From 60da3df5081bcb76e04e3ac012299ba16b8f2802 Mon Sep 17 00:00:00 2001 From: Vamsi Krishna <46787868+vamsikrishnamathala@users.noreply.github.com> Date: Thu, 5 Mar 2026 14:43:17 +0530 Subject: [PATCH] [GIT-40]fix: apply sub-issue display filter when adding work items #8534 --- apps/web/core/store/issue/helpers/base-issues.store.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/web/core/store/issue/helpers/base-issues.store.ts b/apps/web/core/store/issue/helpers/base-issues.store.ts index 54525fb67..023f6590d 100644 --- a/apps/web/core/store/issue/helpers/base-issues.store.ts +++ b/apps/web/core/store/issue/helpers/base-issues.store.ts @@ -1204,6 +1204,9 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { const issueId = issue?.id ?? issueBeforeUpdate?.id; if (!issueId) return; + // Get display filters to check if 'Show sub Work items' is enabled - Donot add Work item to main list if disabled. + const isShowWorkItemsEnabled = this.issueFilterStore.issueFilters?.displayFilters?.sub_issue ?? false; + // get issueUpdates from another method by passing down the three arguments // issueUpdates is nothing but an array of objects that contain the path of the issueId list that need updating and also the action that needs to be performed at the path const issueUpdates = this.getUpdateDetails(issue, issueBeforeUpdate, action); @@ -1213,6 +1216,8 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { for (const issueUpdate of issueUpdates) { //if update is add, add it at a particular path if (issueUpdate.action === EIssueGroupedAction.ADD) { + const isSubIssue = issue?.parent_id; + if (isSubIssue && !isShowWorkItemsEnabled) continue; // add issue Id at the path update(this, ["groupedIssueIds", ...issueUpdate.path], (issueIds: string[] = []) => this.issuesSortWithOrderBy(uniq(concat(issueIds, issueId)), this.orderBy)