Browse Source

SONAR-19345 Add all filters to issue link

tags/10.1.0.73491
Wouter Admiraal 11 months ago
parent
commit
35837bfd38

+ 5
- 2
server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx View File

@@ -19,12 +19,13 @@
*/
import { StandoutLink } from 'design-system';
import * as React from 'react';
import { parseQuery, serializeQuery } from '../../../apps/issues/utils';
import { getBranchLikeQuery } from '../../../helpers/branch-like';
import { translate } from '../../../helpers/l10n';
import { getComponentIssuesUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
import { IssueType } from '../../../types/issues';
import { Issue } from '../../../types/types';
import { useLocation } from '../../hoc/withRouter';
import { IssueMessageHighlighting } from '../IssueMessageHighlighting';

export interface IssueMessageProps {
@@ -35,6 +36,8 @@ export interface IssueMessageProps {

export default function IssueMessage(props: IssueMessageProps) {
const { issue, branchLike, displayWhyIsThisAnIssue } = props;
const location = useLocation();
const query = parseQuery(location.query);

const { message, messageFormattings } = issue;

@@ -48,8 +51,8 @@ export default function IssueMessage(props: IssueMessageProps) {

const issueUrl = getComponentIssuesUrl(issue.project, {
...getBranchLikeQuery(branchLike),
...serializeQuery(query),
open: issue.key,
types: issue.type === IssueType.SecurityHotspot ? issue.type : undefined,
});
return (
<>

Loading…
Cancel
Save