π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-3461] fix: profile activity rendering issue (#7059)
Akshita Goyal7e21618762ac
diff --git a/web/core/components/core/activity.tsx b/web/core/components/core/activity.tsxindex 3febacd2d0..0a12457254 100644--- a/web/core/components/core/activity.tsx+++ b/web/core/components/core/activity.tsx@@ -21,7 +21,7 @@ import {UsersIcon,} from "lucide-react";import { IIssueActivity } from "@plane/types";-import { Tooltip, BlockedIcon, BlockerIcon, RelatedIcon, LayersIcon, DiceIcon, Intake } from "@plane/ui";+import { Tooltip, BlockedIcon, BlockerIcon, RelatedIcon, LayersIcon, DiceIcon, Intake, EpicIcon } from "@plane/ui";// helpersimport { renderFormattedDate } from "@/helpers/date-time.helper";import { generateWorkItemLink } from "@/helpers/issue.helper";@@ -271,6 +271,12 @@ const activityDetails: {created <IssueLink activity={activity} /></>);+ else if (activity.verb === "converted")+ return (+ <>+ converted <IssueLink activity={activity} /> to an epic+ </>+ );elsereturn (<>@@ -280,6 +286,29 @@ const activityDetails: {},icon: <LayersIcon width={12} height={12} className="text-custom-text-200" aria-hidden="true" />,},+ epic: {+ message: (activity) => {+ if (activity.verb === "created")+ return (+ <>+ created <IssueLink activity={activity} />+ </>+ );+ else if (activity.verb === "converted")+ return (+ <>+ converted <IssueLink activity={activity} /> to a work item+ </>+ );+ else+ return (+ <>+ deleted <IssueLink activity={activity} />+ </>+ );+ },+ icon: <EpicIcon width={12} height={12} className="text-custom-text-200" aria-hidden="true" />,+ },labels: {message: (activity, showIssue, workspaceSlug) => {if (activity.old_value === "")@@ -727,10 +756,11 @@ type ActivityMessageProps = {export const ActivityMessage = ({ activity, showIssue = false }: ActivityMessageProps) => {// router paramsconst { workspaceSlug } = useParams();+ const activityField = activity.field ?? "issue";return (<>- {activityDetails[activity.field as keyof typeof activityDetails]?.message(+ {activityDetails[activityField as keyof typeof activityDetails]?.message(activity,showIssue,workspaceSlug ? workspaceSlug.toString() : (activity.workspace_detail?.slug ?? "")diff --git a/web/core/components/profile/activity/profile-activity-list.tsx b/web/core/components/profile/activity/profile-activity-list.tsxindex 4d10ce2b1e..efcd83e730 100644--- a/web/core/components/profile/activity/profile-activity-list.tsx+++ b/web/core/components/profile/activity/profile-activity-list.tsx@@ -113,16 +113,7 @@ export const ProfileActivityListPage: React.FC<Props> = observer((props) => {</div>);- const message =- activityItem.verb === "created" &&- !["cycles", "modules", "attachment", "link", "estimate"].includes(activityItem.field) &&- !activityItem.field ? (- <span>- created <IssueLink activity={activityItem} />- </span>- ) : (- <ActivityMessage activity={activityItem} showIssue />- );+ const message = <ActivityMessage activity={activityItem} showIssue />;if ("field" in activityItem && activityItem.field !== "updated_by")return (