Commit 31915f7f authored by Donald Cook's avatar Donald Cook

Renamed the event and added it to add existing issue

parent 1cc022f9
...@@ -59,4 +59,4 @@ export const issueHealthStatusCSSMapping = { ...@@ -59,4 +59,4 @@ export const issueHealthStatusCSSMapping = {
needsAttention: 'status-needs-attention', needsAttention: 'status-needs-attention',
}; };
export const trackingNewIssue = 'g_product_planning_epic_new_issue_added_from_epic'; export const trackingAddedIssue = 'g_project_management_epic_issue_added_from_epic';
...@@ -12,7 +12,7 @@ import { ...@@ -12,7 +12,7 @@ import {
relatedIssuesRemoveErrorMap, relatedIssuesRemoveErrorMap,
} from '~/related_issues/constants'; } from '~/related_issues/constants';
import { ChildType, ChildState, idProp, relativePositions, trackingNewIssue } from '../constants'; import { ChildType, ChildState, idProp, relativePositions, trackingAddedIssue } from '../constants';
import epicChildReorder from '../queries/epicChildReorder.mutation.graphql'; import epicChildReorder from '../queries/epicChildReorder.mutation.graphql';
import { processQueryResponse, formatChildItem, gqClient } from '../utils/epic_utils'; import { processQueryResponse, formatChildItem, gqClient } from '../utils/epic_utils';
...@@ -335,6 +335,7 @@ export const addItem = ({ state, dispatch, getters }) => { ...@@ -335,6 +335,7 @@ export const addItem = ({ state, dispatch, getters }) => {
issuable_references: state.pendingReferences, issuable_references: state.pendingReferences,
}) })
.then(({ data }) => { .then(({ data }) => {
Api.trackRedisHllUserEvent(trackingAddedIssue);
dispatch('receiveAddItemSuccess', { dispatch('receiveAddItemSuccess', {
// Newly added item is always first in the list // Newly added item is always first in the list
rawItems: data.issuables.slice(0, state.pendingReferences.length), rawItems: data.issuables.slice(0, state.pendingReferences.length),
...@@ -568,7 +569,7 @@ export const createNewIssue = ({ state, dispatch }, { issuesEndpoint, title }) = ...@@ -568,7 +569,7 @@ export const createNewIssue = ({ state, dispatch }, { issuesEndpoint, title }) =
return axios return axios
.post(issuesEndpoint, { epic_id: epicId, title }) .post(issuesEndpoint, { epic_id: epicId, title })
.then(({ data }) => { .then(({ data }) => {
Api.trackRedisHllUserEvent(trackingNewIssue); Api.trackRedisHllUserEvent(trackingAddedIssue);
dispatch('receiveCreateIssueSuccess', data); dispatch('receiveCreateIssueSuccess', data);
dispatch('fetchItems', { dispatch('fetchItems', {
parentItem, parentItem,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment