Commit 8158ddba authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'djensen-replace-vsa-stop-event-with-end-event' into 'master'

Replace VSA "stop event" with "end event" for clarity

See merge request gitlab-org/gitlab!64367
parents e33e7ac7 9a4fc6a0
......@@ -58,9 +58,9 @@ The **Time** metrics near the top of the page are measured as follows:
## How the stages are measured
Value Stream Analytics uses start events and stop events to measure the time that an issue or merge request spends in each stage.
Value Stream Analytics uses start events and end events to measure the time that an issue or merge request spends in each stage.
For example, a stage might start when one label is added to an issue and end when another label is added.
Items aren't included in the stage time calculation if they have not reached the stop event.
Items aren't included in the stage time calculation if they have not reached the end event.
| Stage | Description |
|---------|---------------|
......
......@@ -96,9 +96,9 @@ You can learn more about these metrics in our [analytics definitions](../../anal
## How the stages are measured
Value Stream Analytics measures each stage from its start event to its stop event.
Value Stream Analytics measures each stage from its start event to its end event.
For example, a stage might start when one label is added to an issue, and end when another label is added.
Value Stream Analytics excludes work in progress, meaning it ignores any items that have not reached the stop event.
Value Stream Analytics excludes work in progress, meaning it ignores any items that have not reached the end event.
Each stage of Value Stream Analytics is further described in the table below.
......
......@@ -7,8 +7,8 @@ import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import {
customStageEvents as stageEvents,
labelStartEvent,
labelStopEvent,
customStageStopEvents as endEvents,
labelEndEvent,
customStageEndEvents as endEvents,
} from '../../mock_data';
import { emptyState, emptyErrorsState, firstLabel } from './mock_data';
......@@ -174,7 +174,7 @@ describe('CustomStageFields', () => {
wrapper = createComponent({
stage: {
startEventIdentifier: labelStartEvent.identifier,
endEventIdentifier: labelStopEvent.identifier,
endEventIdentifier: labelEndEvent.identifier,
},
});
});
......
import { groupLabels, labelStartEvent, labelStopEvent } from '../../mock_data';
import { groupLabels, labelStartEvent, labelEndEvent } from '../../mock_data';
export const MERGE_REQUEST_CREATED = 'merge_request_created';
export const ISSUE_CREATED = 'issue_created';
......@@ -30,7 +30,7 @@ export const formInitialData = {
name: 'Cool stage pre',
startEventIdentifier: labelStartEvent.identifier,
startEventLabelId: firstLabel.id,
endEventIdentifier: labelStopEvent.identifier,
endEventIdentifier: labelEndEvent.identifier,
endEventLabelId: firstLabel.id,
};
......
......@@ -187,20 +187,20 @@ export const camelCasedStageEvents = rawCustomStageEvents.map(deepCamelCase);
export const customStageLabelEvents = camelCasedStageEvents.filter((ev) => ev.type === 'label');
export const customStageStartEvents = camelCasedStageEvents.filter((ev) => ev.canBeStartEvent);
// get all the possible stop events
// get all the possible end events
const allowedEndEventIds = new Set(customStageStartEvents.flatMap((e) => e.allowedEndEvents));
export const customStageStopEvents = camelCasedStageEvents.filter((ev) =>
export const customStageEndEvents = camelCasedStageEvents.filter((ev) =>
allowedEndEventIds.has(ev.identifier),
);
export const customStageEvents = uniq(
[...customStageStartEvents, ...customStageStopEvents],
[...customStageStartEvents, ...customStageEndEvents],
false,
(ev) => ev.identifier,
);
export const labelStartEvent = customStageLabelEvents[0];
export const labelStopEvent = customStageLabelEvents.find(
export const labelEndEvent = customStageLabelEvents.find(
(ev) => ev.identifier === labelStartEvent.allowedEndEvents[0],
);
......
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