chore: new analytic events (#699)
* feat: tracking events for issues marked as DONE, issue property update, issue moved to cycle, issue moved to modules * fix: changed events names * chore: sync analytic * chore: new analytic events
This commit is contained in:
parent
65037b5031
commit
cf662f6e6c
12 changed files with 428 additions and 31 deletions
|
|
@ -10,6 +10,7 @@ import { DragDropContext, DropResult } from "react-beautiful-dnd";
|
|||
import issuesService from "services/issues.service";
|
||||
import stateService from "services/state.service";
|
||||
import modulesService from "services/modules.service";
|
||||
import trackEventServices from "services/track-event.service";
|
||||
// hooks
|
||||
import useToast from "hooks/use-toast";
|
||||
import useIssuesView from "hooks/use-issues-view";
|
||||
|
|
@ -259,7 +260,22 @@ export const IssuesView: React.FC<Props> = ({
|
|||
state: draggedItem.state,
|
||||
sort_order: draggedItem.sort_order,
|
||||
})
|
||||
.then(() => {
|
||||
.then((response) => {
|
||||
const sourceStateBeforeDrag = states.find((state) => state.name === source.droppableId);
|
||||
|
||||
if (
|
||||
sourceStateBeforeDrag?.group !== "completed" &&
|
||||
response?.state_detail?.group === "completed"
|
||||
)
|
||||
trackEventServices.trackIssueMarkedAsDoneEvent({
|
||||
workspaceSlug,
|
||||
workspaceId: draggedItem.workspace_detail.id,
|
||||
projectName: draggedItem.project_detail.name,
|
||||
projectIdentifier: draggedItem.project_detail.identifier,
|
||||
projectId,
|
||||
issueId: draggedItem.id,
|
||||
});
|
||||
|
||||
if (cycleId) {
|
||||
mutate(CYCLE_ISSUES_WITH_PARAMS(cycleId as string, params));
|
||||
mutate(CYCLE_DETAILS(cycleId as string));
|
||||
|
|
@ -282,6 +298,7 @@ export const IssuesView: React.FC<Props> = ({
|
|||
orderBy,
|
||||
handleDeleteIssue,
|
||||
params,
|
||||
states,
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue