Skip to content

Commit

Permalink
Bug 1885655 - use 'Fenix :: General' as default Bugzilla component fo…
Browse files Browse the repository at this point in the history
…r android-components, fenix and focus tasks
  • Loading branch information
Archaeopteryx committed Mar 15, 2024
1 parent ee019a6 commit a9c12c5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/ui/job-view/bugfiler_test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('BugFiler', () => {
job_group_name: 'Mochitests executed by TaskCluster',
job_type_name: 'test-linux64/debug-mochitest-browser-chrome-10',
job_type_symbol: 'bc10',
platform: 'windows11-64',
};
const suggestions = [
{
Expand Down Expand Up @@ -120,6 +121,7 @@ describe('BugFiler', () => {
successCallback={successCallback}
jobGroupName={selectedJob.job_group_name}
jobTypeName={selectedJob.job_type_name}
platform={selectedJob.platform}
notify={() => {}}
/>
</Provider>
Expand All @@ -138,6 +140,7 @@ describe('BugFiler', () => {
successCallback={successCallback}
jobGroupName={selectedJob.job_group_name}
jobTypeName={selectedJob.job_type_name}
platform={selectedJob.platform}
notify={() => {}}
/>
</Provider>
Expand Down
25 changes: 24 additions & 1 deletion ui/shared/BugFiler.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,31 @@ export class BugFilerClass extends React.Component {
* file path or its end.
*/
findProductByPath = async () => {
const { suggestion } = this.props;
const { suggestion, platform } = this.props;
const { crashSignatures } = this.state;
const pathEnd = suggestion.path_end;

if (
!crashSignatures.length &&
(platform.startsWith('AC-') || platform.startsWith('fenix-'))
) {
this.setState({
suggestedProducts: ['Fenix :: General'],
selectedProduct: 'Fenix :: General',
searching: false,
});
return;
}

if (!crashSignatures.length && platform.startsWith('focus-')) {
this.setState({
suggestedProducts: ['Focus :: General'],
selectedProduct: 'Focus :: General',
searching: false,
});
return;
}

if (!pathEnd) {
return;
}
Expand Down Expand Up @@ -1001,6 +1022,8 @@ BugFilerClass.propTypes = {
reftestUrl: PropTypes.string.isRequired,
successCallback: PropTypes.func.isRequired,
jobGroupName: PropTypes.string.isRequired,
jobTypeName: PropTypes.string.isRequired,
platform: PropTypes.string.isRequired,
notify: PropTypes.func.isRequired,
};

Expand Down
1 change: 1 addition & 0 deletions ui/shared/tabs/failureSummary/FailureSummaryTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ class FailureSummaryTab extends React.Component {
successCallback={this.bugFilerCallback}
jobGroupName={selectedJob.job_group_name}
jobTypeName={selectedJob.job_type_name}
platform={selectedJob.platform}
/>
)}
</div>
Expand Down

0 comments on commit a9c12c5

Please sign in to comment.