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 = {
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 {
relatedIssuesRemoveErrorMap,
} 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 { processQueryResponse, formatChildItem, gqClient } from '../utils/epic_utils';
......@@ -335,6 +335,7 @@ export const addItem = ({ state, dispatch, getters }) => {
issuable_references: state.pendingReferences,
})
.then(({ data }) => {
Api.trackRedisHllUserEvent(trackingAddedIssue);
dispatch('receiveAddItemSuccess', {
// Newly added item is always first in the list
rawItems: data.issuables.slice(0, state.pendingReferences.length),
......@@ -568,7 +569,7 @@ export const createNewIssue = ({ state, dispatch }, { issuesEndpoint, title }) =
return axios
.post(issuesEndpoint, { epic_id: epicId, title })
.then(({ data }) => {
Api.trackRedisHllUserEvent(trackingNewIssue);
Api.trackRedisHllUserEvent(trackingAddedIssue);
dispatch('receiveCreateIssueSuccess', data);
dispatch('fetchItems', {
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