Skip to content

Commit e0dfeb0

Browse files
committed
Fix typo and occurrence check before opening the bug filer
1 parent 8bc2b28 commit e0dfeb0

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Diff for: ui/helpers/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,4 +363,4 @@ export const sxsTaskName = 'side-by-side';
363363
export const geckoProfileTaskName = 'geckoprofile';
364364

365365
// Number of internal issue classifications to open a bug in Bugzilla
366-
export const requiredInternalOcurrences = 3;
366+
export const requiredInternalOccurrences = 3;

Diff for: ui/shared/tabs/failureSummary/BugListItem.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Button } from 'reactstrap';
77

88
import { getSearchWords } from '../../../helpers/display';
99
import { getBugUrl } from '../../../helpers/url';
10-
import { requiredInternalOcurrences } from '../../../helpers/constants';
10+
import { requiredInternalOccurrences } from '../../../helpers/constants';
1111

1212
function BugListItem(props) {
1313
const {
@@ -46,14 +46,14 @@ function BugListItem(props) {
4646
{bug.summary}
4747
{!bug.bugzilla_id && (
4848
<Button
49-
disabled={bug.occurrences < requiredInternalOcurrences}
49+
disabled={bug.occurrences < requiredInternalOccurrences}
5050
className="bg-light py-1 px-2 ml-2"
5151
outline
5252
style={{ fontSize: '8px' }}
5353
onClick={() => toggleBugFiler(suggestion)}
5454
title={
55-
bug.occurrences < requiredInternalOcurrences
56-
? `${requiredInternalOcurrences} classification occurrences are required to file a bug`
55+
bug.occurrences < requiredInternalOccurrences
56+
? `${requiredInternalOccurrences} classification occurrences are required to file a bug`
5757
: 'File a bug for this internal issue'
5858
}
5959
>

Diff for: ui/shared/tabs/failureSummary/FailureSummaryTab.jsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { faSpinner } from '@fortawesome/free-solid-svg-icons';
77
import {
88
thBugSuggestionLimit,
99
thEvents,
10-
requiredInternalOcurrences,
10+
requiredInternalOccurrences,
1111
} from '../../../helpers/constants';
1212
import { getResultState, isReftest } from '../../../helpers/job';
1313
import { getReftestUrl } from '../../../helpers/url';
@@ -104,7 +104,11 @@ class FailureSummaryTab extends React.Component {
104104
const existingBug = internalBugs.filter(
105105
(bug) => bug.internal_id === data.internal_id,
106106
)[0];
107-
if (existingBug && existingBug.occurrences >= requiredInternalOcurrences) {
107+
// Check if we reached the required number of occurrence to open a bug in Bugzilla
108+
if (
109+
existingBug &&
110+
existingBug.occurrences >= requiredInternalOccurrences - 1
111+
) {
108112
this.fileBug(suggestion);
109113
}
110114
};

0 commit comments

Comments
 (0)