Skip to content

Commit

Permalink
EPMRPP-90462 || Add event to track who marked/unmarked the launch as …
Browse files Browse the repository at this point in the history
…Important (#3860)
  • Loading branch information
Vadim73i authored Jun 7, 2024
1 parent 381b0dd commit 620c8cb
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 4 deletions.
8 changes: 7 additions & 1 deletion app/localization/translated/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,14 @@
"EventActions.import": "Імпарт",
"EventActions.linkIssue": "Прывязка праблемы",
"EventActions.linkIssueAA": "Прывязка праблемы автоанализом",
"EventActions.markLaunchAsImportant": "Пазначыць запуск як важны",
"EventActions.matchedPattern": "Патэрн-аналіз выявіў адпаведнасць",
"EventActions.postIssue": "Cтварэнне праблемы",
"EventActions.startImport": "Пачаць імпарт",
"EventActions.startLaunch": "Старт запуску",
"EventActions.unassignUser": "Адмяніць прызначэнне карыстальніка",
"EventActions.unlinkIssue": "Адвязка праблемы",
"EventActions.unmarkLaunchAsImportant": "Зняць пазнаку запуску як важнага",
"EventActions.updateAnalyzer": "Абнаўленне автоанализа",
"EventActions.updateAutoPatternAnalysisSettings": "Абнавіць налады Pattern-Analysis",
"EventActions.updateDashboard": "Абнаўленне панэлі кіравання",
Expand Down Expand Up @@ -1070,8 +1072,10 @@
"LaunchChanges.finish": "завяршыў",
"LaunchChanges.finishImport": "канец імпарту",
"LaunchChanges.launch": "запуск",
"LaunchChanges.markLaunchAsImportant": " пазначана як важны карыстальнікам ",
"LaunchChanges.start": "старт",
"LaunchChanges.startImport": "пачатак імпарту",
"LaunchChanges.unmarkLaunchAsImportant": " не пазначаны як важны карыстальнікам ",
"LaunchDurationControls.ItemsFieldLabel": "Элементы",
"LaunchDurationControls.ItemsValidationError": "Колькасць элементаў павінна быць памерам ад '1' да '600'",
"LaunchExecutionAndIssueStatistics.launchNameText": "Імя запуску:",
Expand Down Expand Up @@ -2057,10 +2061,12 @@
"WidgetCriteriaOption.import_actions": "Iмпарт",
"WidgetCriteriaOption.integration_actions": "Абнавіць інтэграцыю",
"WidgetCriteriaOption.issues_actions": "Дзеянні з памылкамі",
"WidgetCriteriaOption.markLaunchAsImportant": "Пазначыць запуск як важны",
"WidgetCriteriaOption.matched_pattern": "Патэрн быў знойдзены",
"WidgetCriteriaOption.startTime": "Старт",
"WidgetCriteriaOption.start_launch": "Пачаць запуск",
"WidgetCriteriaOption.unassign_user": "Адмяніць прызначэнне карыстальніка",
"WidgetCriteriaOption.unmarkLaunchAsImportant": "Зняць пазнаку запуску як важнага",
"WidgetCriteriaOption.updateAutoPatternAnalysisSettings": "Абнавіць налады Pattern-Analysis",
"WidgetCriteriaOption.update_pattern": "Абнавіць патэрн",
"WidgetCriteriaOption.update_project": "Абнавіць налады праекта",
Expand Down Expand Up @@ -2204,4 +2210,4 @@
"usersGrid.roleNonAdmin": "Не Адмін",
"usersGrid.type": "Тып",
"usersGrid.user": "Лагін"
}
}
8 changes: 7 additions & 1 deletion app/localization/translated/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,14 @@
"EventActions.import": "Импорт",
"EventActions.linkIssue": "Привязка ошибки",
"EventActions.linkIssueAA": "Привязка ошибки автоанализом",
"EventActions.markLaunchAsImportant": "Отметить запуск как важный",
"EventActions.matchedPattern": "Паттерн-анализ обнаружил соответствие",
"EventActions.postIssue": "Создание ошибки",
"EventActions.startImport": "Начать импорт",
"EventActions.startLaunch": "Старт запуска",
"EventActions.unassignUser": "Отменить назначение пользователя",
"EventActions.unlinkIssue": "Открепление ошибки",
"EventActions.unmarkLaunchAsImportant": "Снять отметку важно",
"EventActions.updateAnalyzer": "Обновление автоанализа",
"EventActions.updateAutoPatternAnalysisSettings": "Обновить настройки Pattern-Analysis",
"EventActions.updateDashboard": "Oбновление панели управления",
Expand Down Expand Up @@ -1070,8 +1072,10 @@
"LaunchChanges.finish": "завершил",
"LaunchChanges.finishImport": "конец импорта",
"LaunchChanges.launch": "запуск",
"LaunchChanges.markLaunchAsImportant": " отмечен как важный пользователем ",
"LaunchChanges.start": "старт",
"LaunchChanges.startImport": "начало импорта",
"LaunchChanges.unmarkLaunchAsImportant": " отмечен как неважный пользователем ",
"LaunchDurationControls.ItemsFieldLabel": "Элементы",
"LaunchDurationControls.ItemsValidationError": "Количество элементов принимает значения от '1' до '600'",
"LaunchExecutionAndIssueStatistics.launchNameText": "Имя запуска:",
Expand Down Expand Up @@ -2057,10 +2061,12 @@
"WidgetCriteriaOption.import_actions": "Импорт",
"WidgetCriteriaOption.integration_actions": "Обновить интеграцию",
"WidgetCriteriaOption.issues_actions": "Действия с ошибками",
"WidgetCriteriaOption.markLaunchAsImportant": "Отметить запуск как важный",
"WidgetCriteriaOption.matched_pattern": "Паттерн был найден",
"WidgetCriteriaOption.startTime": "Старт",
"WidgetCriteriaOption.start_launch": "Начать запуск",
"WidgetCriteriaOption.unassign_user": "Отменить назначение пользователя",
"WidgetCriteriaOption.unmarkLaunchAsImportant": "Снять отметку важно",
"WidgetCriteriaOption.updateAutoPatternAnalysisSettings": "Обновить настройки Pattern-Analysis",
"WidgetCriteriaOption.update_pattern": "Обновить паттерн",
"WidgetCriteriaOption.update_project": "Обновить настройки проекта",
Expand Down Expand Up @@ -2204,4 +2210,4 @@
"usersGrid.roleNonAdmin": "Не Админ",
"usersGrid.type": "Тип",
"usersGrid.user": "Логин"
}
}
8 changes: 7 additions & 1 deletion app/localization/translated/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,14 @@
"EventActions.import": "Імпорт",
"EventActions.linkIssue": "Прив’язка помилки",
"EventActions.linkIssueAA": "Прив’язка помилки автоанализом",
"EventActions.markLaunchAsImportant": "Позначити запуск як важливий",
"EventActions.matchedPattern": "Патерн-аналіз виявив відповідність",
"EventActions.postIssue": "Створення помилки",
"EventActions.startImport": "Розпочати імпорт",
"EventActions.startLaunch": "Старт запуску",
"EventActions.unassignUser": "Скасувати призначення користувача",
"EventActions.unlinkIssue": "Відкріплення помилки",
"EventActions.unmarkLaunchAsImportant": "Зняти позначку запуску як важливого",
"EventActions.updateAnalyzer": "Оновлення автоанализа",
"EventActions.updateAutoPatternAnalysisSettings": "Оновити параметри Pattern-Analysis",
"EventActions.updateDashboard": "Оновлення панелі управління",
Expand Down Expand Up @@ -1070,8 +1072,10 @@
"LaunchChanges.finish": "завершив",
"LaunchChanges.finishImport": "імпорту кінець",
"LaunchChanges.launch": "запуск",
"LaunchChanges.markLaunchAsImportant": " позначено як важливе користувачем ",
"LaunchChanges.start": "старт",
"LaunchChanges.startImport": "початок імпорту",
"LaunchChanges.unmarkLaunchAsImportant": " не позначено як важливе користувачем ",
"LaunchDurationControls.ItemsFieldLabel": "Елементи",
"LaunchDurationControls.ItemsValidationError": "Кількість елементів приймає значення від '1' до '600'",
"LaunchExecutionAndIssueStatistics.launchNameText": "Ім’я запуску:",
Expand Down Expand Up @@ -2057,10 +2061,12 @@
"WidgetCriteriaOption.import_actions": "Імпорт",
"WidgetCriteriaOption.integration_actions": "Оновити інтеграцію",
"WidgetCriteriaOption.issues_actions": "Дії з помилками",
"WidgetCriteriaOption.markLaunchAsImportant": "Позначити запуск як важливий",
"WidgetCriteriaOption.matched_pattern": "Був знайдений Патерн",
"WidgetCriteriaOption.startTime": "Старт",
"WidgetCriteriaOption.start_launch": "Почати запуск",
"WidgetCriteriaOption.unassign_user": "Скасувати призначення користувача",
"WidgetCriteriaOption.unmarkLaunchAsImportant": "Зняти позначку запуску як важливого",
"WidgetCriteriaOption.updateAutoPatternAnalysisSettings": "Оновити параметри Pattern-Analysis",
"WidgetCriteriaOption.update_pattern": "Оновити патерн",
"WidgetCriteriaOption.update_project": "Оновити налаштування проекту",
Expand Down Expand Up @@ -2204,4 +2210,4 @@
"usersGrid.roleNonAdmin": "Не Адмін",
"usersGrid.type": "Тип",
"usersGrid.user": "Логін"
}
}
6 changes: 6 additions & 0 deletions app/localization/translated/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,14 @@
"EventActions.import": "导入",
"EventActions.linkIssue": "与问题关联",
"EventActions.linkIssueAA": "自动分析服务关联的问题",
"EventActions.markLaunchAsImportant": "Mark launch as Important",
"EventActions.matchedPattern": "模板分析已找到模板",
"EventActions.postIssue": "发布问题",
"EventActions.startImport": "开始导入",
"EventActions.startLaunch": "开始执行测试任务",
"EventActions.unassignUser": "取消分配用户",
"EventActions.unlinkIssue": "取消已关联的问题",
"EventActions.unmarkLaunchAsImportant": "Unmark as launch as Important",
"EventActions.updateAnalyzer": "更新分析器",
"EventActions.updateAutoPatternAnalysisSettings": "更新模式分析设置",
"EventActions.updateDashboard": "更新报告面板",
Expand Down Expand Up @@ -1070,8 +1072,10 @@
"LaunchChanges.finish": "完成",
"LaunchChanges.finishImport": "导入结束",
"LaunchChanges.launch": "测试任务",
"LaunchChanges.markLaunchAsImportant": " is marked as important by ",
"LaunchChanges.start": "开始",
"LaunchChanges.startImport": "导入开始",
"LaunchChanges.unmarkLaunchAsImportant": " is unmarked as important by ",
"LaunchDurationControls.ItemsFieldLabel": "测试项",
"LaunchDurationControls.ItemsValidationError": "测试项的数量应为1到600个",
"LaunchExecutionAndIssueStatistics.launchNameText": "测试任务名:",
Expand Down Expand Up @@ -2057,10 +2061,12 @@
"WidgetCriteriaOption.import_actions": "导入",
"WidgetCriteriaOption.integration_actions": "更新集成",
"WidgetCriteriaOption.issues_actions": "对问题的操作",
"WidgetCriteriaOption.markLaunchAsImportant": "Mark launch as important",
"WidgetCriteriaOption.matched_pattern": "匹配的模板",
"WidgetCriteriaOption.startTime": "开始时间",
"WidgetCriteriaOption.start_launch": "启动测试任务",
"WidgetCriteriaOption.unassign_user": "Unassign user",
"WidgetCriteriaOption.unmarkLaunchAsImportant": "Unmark launch as important",
"WidgetCriteriaOption.updateAutoPatternAnalysisSettings": "Update Pattern-Analysis settings",
"WidgetCriteriaOption.update_pattern": "更新模板",
"WidgetCriteriaOption.update_project": "更新项目设置",
Expand Down
2 changes: 2 additions & 0 deletions app/src/common/constants/actionTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
export const START_LAUNCH = 'startLaunch';
export const FINISH_LAUNCH = 'finishLaunch';
export const DELETE_LAUNCH = 'deleteLaunch';
export const MARK_LAUNCH_AS_IMPORTANT = 'markLaunchAsImportant';
export const UNMARK_LAUNCH_AS_IMPORTANT = 'unmarkLaunchAsImportant';
export const POST_ISSUE = 'postIssue';
export const LINK_ISSUE = 'linkIssue';
export const UNLINK_ISSUE = 'unlinkIssue';
Expand Down
10 changes: 10 additions & 0 deletions app/src/common/constants/localization/eventsLocalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ import {
IMPORT as EVENT_ACTIONS_IMPORT,
FINISH_IMPORT,
START_IMPORT,
MARK_LAUNCH_AS_IMPORTANT,
UNMARK_LAUNCH_AS_IMPORTANT,
} from 'common/constants/actionTypes';

export const actionMessages = defineMessages({
Expand Down Expand Up @@ -124,6 +126,14 @@ export const actionMessages = defineMessages({
id: 'EventActions.deleteLaunch',
defaultMessage: 'Delete launch',
},
[MARK_LAUNCH_AS_IMPORTANT]: {
id: 'EventActions.markLaunchAsImportant',
defaultMessage: 'Mark launch as Important',
},
[UNMARK_LAUNCH_AS_IMPORTANT]: {
id: 'EventActions.unmarkLaunchAsImportant',
defaultMessage: 'Unmark as launch as Important',
},
[EVENT_ACTIONS_IMPORT]: {
id: 'EventActions.import',
defaultMessage: 'Import',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import {
DELETE_LAUNCH,
START_IMPORT,
FINISH_IMPORT,
MARK_LAUNCH_AS_IMPORTANT,
UNMARK_LAUNCH_AS_IMPORTANT,
} from 'common/constants/actionTypes';
import { getTestItemPageLink } from './utils';
import styles from './common.scss';
Expand All @@ -47,6 +49,14 @@ const messages = defineMessages({
id: 'LaunchChanges.delete',
defaultMessage: 'deleted',
},
[MARK_LAUNCH_AS_IMPORTANT]: {
id: 'LaunchChanges.markLaunchAsImportant',
defaultMessage: ' is marked as important by ',
},
[UNMARK_LAUNCH_AS_IMPORTANT]: {
id: 'LaunchChanges.unmarkLaunchAsImportant',
defaultMessage: ' is unmarked as important by ',
},
[START_IMPORT]: {
id: 'LaunchChanges.startImport',
defaultMessage: 'started import',
Expand Down Expand Up @@ -82,16 +92,29 @@ export class Launch extends Component {
activity,
intl: { formatMessage },
} = this.props;

const isRetentionType =
activity.actionType === MARK_LAUNCH_AS_IMPORTANT ||
activity.actionType === UNMARK_LAUNCH_AS_IMPORTANT;

return (
<Fragment>
<span className={cx('user-name')}>{activity.user}</span>
{`${messages[activity.actionType] && formatMessage(messages[activity.actionType])}`}
{!isRetentionType &&
`${messages[activity.actionType] && formatMessage(messages[activity.actionType])}`}
{activity.actionType === DELETE_LAUNCH && (
<Fragment>
{` ${formatMessage(messages.launch)} `}
{activity.objectName}.
</Fragment>
)}
{isRetentionType && (
<Fragment>
<span className={cx('activity-name')}>{activity.objectName}</span>
{formatMessage(messages[activity.actionType])}
<span className={cx('user-name')}>{activity.user}</span>
</Fragment>
)}
{(activity.actionType === START_LAUNCH || activity.actionType === FINISH_LAUNCH) && (
<Fragment>
{` ${formatMessage(messages.launch)}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ import {
CHANGE_ROLE,
CREATE_PROJECT,
UPDATE_AUTO_PATTERN_ANALYSIS_SETTINGS,
MARK_LAUNCH_AS_IMPORTANT,
UNMARK_LAUNCH_AS_IMPORTANT,
} from 'common/constants/actionTypes';
import { AbsRelTime } from 'components/main/absRelTime';
import { externalSystemSelector } from 'controllers/project';
Expand Down Expand Up @@ -179,6 +181,8 @@ export class ProjectActivity extends Component {
case START_LAUNCH:
case FINISH_LAUNCH:
case DELETE_LAUNCH:
case MARK_LAUNCH_AS_IMPORTANT:
case UNMARK_LAUNCH_AS_IMPORTANT:
return <Launch activity={activity} />;
case UPDATE_PROJECT:
return activity.objectType === UPDATE_NOTIFICATIONS ? (
Expand Down
10 changes: 10 additions & 0 deletions app/src/pages/admin/projectEventsPage/eventsEntities.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ import {
IMPORT as EVENT_ACTIONS_IMPORT,
START_IMPORT,
FINISH_IMPORT,
MARK_LAUNCH_AS_IMPORTANT,
UNMARK_LAUNCH_AS_IMPORTANT,
} from 'common/constants/actionTypes';
import {
DASHBOARD,
Expand Down Expand Up @@ -245,6 +247,14 @@ export class EventsEntities extends Component {
label: intl.formatMessage(actionMessages[DELETE_LAUNCH]),
value: DELETE_LAUNCH,
},
{
label: intl.formatMessage(actionMessages[MARK_LAUNCH_AS_IMPORTANT]),
value: MARK_LAUNCH_AS_IMPORTANT,
},
{
label: intl.formatMessage(actionMessages[UNMARK_LAUNCH_AS_IMPORTANT]),
value: UNMARK_LAUNCH_AS_IMPORTANT,
},
{
label: intl.formatMessage(actionMessages[UPDATE_PROJECT]),
value: UPDATE_PROJECT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ import {
CHANGE_ROLE,
CREATE_PROJECT,
UPDATE_AUTO_PATTERN_ANALYSIS_SETTINGS,
MARK_LAUNCH_AS_IMPORTANT,
UNMARK_LAUNCH_AS_IMPORTANT,
} from 'common/constants/actionTypes';
import { getGroupedDefectTypesOptions } from 'pages/inside/common/utils';
import { defectTypesLocalization } from 'common/constants/localization/defectTypesLocalization';
Expand Down Expand Up @@ -101,6 +103,14 @@ const messages = defineMessages({
id: 'WidgetCriteriaOption.delete_launch',
defaultMessage: 'Delete launch',
},
[MARK_LAUNCH_AS_IMPORTANT]: {
id: 'WidgetCriteriaOption.markLaunchAsImportant',
defaultMessage: 'Mark launch as important',
},
[UNMARK_LAUNCH_AS_IMPORTANT]: {
id: 'WidgetCriteriaOption.unmarkLaunchAsImportant',
defaultMessage: 'Unmark launch as important',
},
[ACTIONS_WITH_ISSUES]: {
id: 'WidgetCriteriaOption.issues_actions',
defaultMessage: 'Actions with issues',
Expand Down Expand Up @@ -254,6 +264,8 @@ const getUserActionOptions = (formatMessage) => [
{ value: START_LAUNCH, label: formatMessage(messages[START_LAUNCH]) },
{ value: FINISH_LAUNCH, label: formatMessage(messages[FINISH_LAUNCH]) },
{ value: DELETE_LAUNCH, label: formatMessage(messages[DELETE_LAUNCH]) },
{ value: MARK_LAUNCH_AS_IMPORTANT, label: formatMessage(messages[MARK_LAUNCH_AS_IMPORTANT]) },
{ value: UNMARK_LAUNCH_AS_IMPORTANT, label: formatMessage(messages[UNMARK_LAUNCH_AS_IMPORTANT]) },
{ value: ACTIONS_WITH_ISSUES, label: formatMessage(messages[ACTIONS_WITH_ISSUES]) },
{ value: ASSIGN_USER, label: formatMessage(messages[ASSIGN_USER]) },
{ value: UNASSIGN_USER, label: formatMessage(messages[UNASSIGN_USER]) },
Expand Down

0 comments on commit 620c8cb

Please sign in to comment.