Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions static/app/components/issues/groupList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ class GroupList extends Component<Props, State> {
queryFilterDescription,
narrowGroups,
source,
query,
} = this.props;
const {loading, error, errorData, groups, memberList, pageLinks} = this.state;

Expand Down Expand Up @@ -308,6 +309,7 @@ class GroupList extends Component<Props, State> {
queryFilterDescription={queryFilterDescription}
narrowGroups={narrowGroups}
source={source}
query={query}
/>
);
})}
Expand Down
21 changes: 21 additions & 0 deletions static/app/views/releases/detail/overview/releaseIssues.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,25 @@ describe('ReleaseIssues', function () {
'/organizations/org-slug/issues/?end=2020-03-24T02%3A04%3A59Z&groupStatsPeriod=auto&query=release%3A1.0.0&sort=freq&start=2020-03-23T01%3A02%3A00Z'
);
});

it('includes release context when linking to issue', async function () {
newIssuesEndpoint = MockApiClient.addMockResponse({
url: `/organizations/${props.organization.slug}/issues/?end=2020-03-24T02%3A04%3A59Z&groupStatsPeriod=auto&limit=10&query=first-release%3A1.0.0%20is%3Aunresolved&sort=freq&start=2020-03-23T01%3A02%3A00Z`,
body: [TestStubs.Group({id: '123'})],
});

const {routerContext} = initializeOrg();

render(<ReleaseIssues {...props} />, {context: routerContext});

await userEvent.click(screen.getByRole('radio', {name: /New Issues/}));

const link = await screen.findByRole('link', {name: /RequestError/});

// Should pass the query param `query` with value `release:1.0.0`
expect(link).toHaveAttribute(
'href',
'/organizations/org-slug/issues/123/?_allp=1&query=release%3A1.0.0&referrer=release-issue-stream'
);
});
});
4 changes: 2 additions & 2 deletions static/app/views/releases/detail/overview/releaseIssues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class ReleaseIssues extends Component<Props, State> {

render() {
const {issuesType, count, pageLinks, onCursor} = this.state;
const {organization, queryFilterDescription, withChart} = this.props;
const {organization, queryFilterDescription, withChart, version} = this.props;
const {path, queryParams} = this.getIssuesEndpoint();
const issuesTypes = [
{value: IssuesType.ALL, label: t('All Issues'), issueCount: count.all},
Expand Down Expand Up @@ -427,7 +427,7 @@ class ReleaseIssues extends Component<Props, State> {
orgId={organization.slug}
endpointPath={path}
queryParams={queryParams}
query=""
query={`release:${version}`}
canSelectGroups={false}
queryFilterDescription={queryFilterDescription}
withChart={withChart}
Expand Down