[WEB-4547]fix: archived work item redirection #7471

This commit is contained in:
Vamsi Krishna
2025-07-24 14:43:31 +05:30
committed by GitHub
parent 56e4d2c6f1
commit 008727d393
2 changed files with 8 additions and 8 deletions

View File

@@ -106,9 +106,8 @@ export const IssueDetailQuickActions: FC<Props> = observer((props) => {
const handleArchiveIssue = async () => {
try {
await archiveIssue(workspaceSlug, projectId, issueId).then(() => {
router.push(`/${workspaceSlug}/projects/${projectId}/archives/issues/${issue.id}`);
});
await archiveIssue(workspaceSlug, projectId, issueId);
router.push(`/${workspaceSlug}/projects/${projectId}/issues`);
captureSuccess({
eventName: WORK_ITEM_TRACKER_EVENTS.archive,
payload: { id: issueId },

View File

@@ -86,8 +86,6 @@ export const IssuePeekOverviewHeader: FC<PeekOverviewHeaderProps> = observer((pr
} = props;
// ref
const parentRef = useRef<HTMLDivElement>(null);
// router
const router = useAppRouter();
const { t } = useTranslation();
// store hooks
const { data: currentUser } = useUser();
@@ -96,6 +94,7 @@ export const IssuePeekOverviewHeader: FC<PeekOverviewHeaderProps> = observer((pr
setPeekIssue,
removeIssue,
archiveIssue,
getIsIssuePeeked,
} = useIssueDetail();
const { isMobile } = usePlatformOS();
const { getProjectIdentifierById } = useProject();
@@ -155,9 +154,11 @@ export const IssuePeekOverviewHeader: FC<PeekOverviewHeaderProps> = observer((pr
const handleArchiveIssue = async () => {
try {
await archiveIssue(workspaceSlug, projectId, issueId).then(() => {
router.push(`/${workspaceSlug}/projects/${projectId}/archives/issues/${issueDetails?.id}`);
});
await archiveIssue(workspaceSlug, projectId, issueId);
// check and remove if issue is peeked
if (getIsIssuePeeked(issueId)) {
removeRoutePeekId();
}
captureSuccess({
eventName: WORK_ITEM_TRACKER_EVENTS.archive,
payload: { id: issueId },