Skip to content

Commit 7e44cbe

Browse files
committed
Move occurrences setting to the frontend
1 parent 54c7aba commit 7e44cbe

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

treeherder/config/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,8 @@
448448
MAX_ERROR_LINES = 40
449449
FAILURE_LINES_CUTOFF = 150
450450

451-
# Required number of occurrences in a given time window before being prompted to file a bug in Bugzilla
451+
# Count internal issue annotations in a limited time window (before prompting user to file a bug in Bugzilla)
452452
INTERNAL_OCCURRENCES_DAYS_WINDOW = 7
453-
INTERNAL_OCCURRENCES_COUNT = 3
454453

455454
# Perfherder
456455
# Default minimum regression threshold for perfherder is 2% (otherwise

ui/shared/tabs/failureSummary/BugListItem.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ function BugListItem(props) {
2121
} = props;
2222
const bugUrl = getBugUrl(bug.id);
2323
const duplicateBugUrl = bug.dupe_of ? getBugUrl(bug.dupe_of) : undefined;
24+
// Number of internal issue classifications to open a bug in Bugzilla
25+
const requiredInternalOcurrences = 3;
2426

2527
return (
2628
<li data-testid="bug-list-item">
@@ -46,15 +48,14 @@ function BugListItem(props) {
4648
{bug.summary}
4749
{!bug.bugzilla_id && (
4850
<Button
49-
// TODO: Update the condition below to match backend configuration
50-
disabled={bug.occurrences < -1}
51+
disabled={bug.occurrences < requiredInternalOcurrences}
5152
className="bg-light py-1 px-2 ml-2"
5253
outline
5354
style={{ fontSize: '8px' }}
5455
onClick={() => toggleBugFiler(suggestion)}
5556
title={
56-
bug.occurrences < -1
57-
? 'Occurences must be > 3 to open a bug'
57+
bug.occurrences < requiredInternalOcurrences
58+
? `${requiredInternalOcurrences} classification occurrences are required to file a bug`
5859
: 'File a bug for this internal issue'
5960
}
6061
>

0 commit comments

Comments
 (0)