Skip to content

Commit

Permalink
fetch issue activity on peek issue update (makeplane#5289)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulramesha authored Aug 2, 2024
1 parent 79fbcaa commit 3a5c77e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/core/components/issues/peek-overview/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
const {
peekIssue,
issue: { fetchIssue },
fetchActivities,
} = useIssueDetail();

const { issues } = useIssuesStore();
Expand Down Expand Up @@ -67,7 +68,8 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
issues?.updateIssue &&
(await issues
.updateIssue(workspaceSlug, projectId, issueId, data)
.then(() => {
.then(async () => {
fetchActivities(workspaceSlug, projectId, issueId);
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { ...data, issueId, state: "SUCCESS", element: "Issue peek-overview" },
Expand Down Expand Up @@ -162,6 +164,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
addCycleToIssue: async (workspaceSlug: string, projectId: string, cycleId: string, issueId: string) => {
try {
await issues.addCycleToIssue(workspaceSlug, projectId, cycleId, issueId);
fetchActivities(workspaceSlug, projectId, issueId);
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { issueId, state: "SUCCESS", element: "Issue peek-overview" },
Expand Down Expand Up @@ -232,6 +235,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
},
});
await removeFromCyclePromise;
fetchActivities(workspaceSlug, projectId, issueId);
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { issueId, state: "SUCCESS", element: "Issue peek-overview" },
Expand Down Expand Up @@ -267,6 +271,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
addModuleIds,
removeModuleIds
);
fetchActivities(workspaceSlug, projectId, issueId);
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { id: issueId, state: "SUCCESS", element: "Issue detail page" },
Expand All @@ -293,6 +298,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
},
});
await removeFromModulePromise;
fetchActivities(workspaceSlug, projectId, issueId);
captureIssueEvent({
eventName: ISSUE_UPDATED,
payload: { id: issueId, state: "SUCCESS", element: "Issue peek-overview" },
Expand Down

0 comments on commit 3a5c77e

Please sign in to comment.