From aebf260aa8db783d3a78e5f2bc477801f720278a Mon Sep 17 00:00:00 2001 From: Badal Khatri Date: Fri, 6 Oct 2023 15:22:00 +0530 Subject: [PATCH] Updated Issue Type Logic --- .../pages/task/title-block/task-title-block.tsx | 4 +++- apps/web/lib/features/task/task-input.tsx | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/web/components/pages/task/title-block/task-title-block.tsx b/apps/web/components/pages/task/title-block/task-title-block.tsx index a51599fc6..c3461296a 100644 --- a/apps/web/components/pages/task/title-block/task-title-block.tsx +++ b/apps/web/components/pages/task/title-block/task-title-block.tsx @@ -222,10 +222,12 @@ const TaskTitleBlock = () => { )} */} {/* Parent Issue/Task Name */} + {/* Current Issue Type is Task|Bug and Parent Issue is Not an Epic */} {(!task?.issueType || task?.issueType === 'Task' || task?.issueType === 'Bug') && - task?.rootEpic && ( + task?.rootEpic && + task?.parentId !== task?.rootEpic.id && ( item.issueType === 'Epic' ); + } else if ( + // TASK|BUG can have ParentId to be set either to Story ID or Epic ID + props.task?.issueType === 'Task' || + props.task?.issueType === 'Bug' || + !props.task?.issueType + ) { + updatedTaskList = datas.filteredTasks.filter( + (item) => item.issueType === 'Epic' || item.issueType === 'Story' + ); } else { updatedTaskList = datas.filteredTasks; }