Skip to content

fix(ui): Fix resolve/ignore actions for accounts without multi project #14058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2019
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
11 changes: 5 additions & 6 deletions src/sentry/static/sentry/app/views/issueList/actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,12 @@ const IssueListActions = createReactClass({
const loadingIndicator = IndicatorStore.add(t('Saving changes..'));

// If `itemIds` is undefined then it means we expect to bulk update all items
// that match the query. In this case we should respect the projects selected in the
// global selection header.
// that match the query.
//
// Otherwise if we have a list of itemIds, then we don't need project constraints since
// they will be unique
const projectConstraints =
typeof itemIds === 'undefined' ? {project: selection.projects} : {};
// We need to always respect the projects selected in the global selection header:
// * users with no global views requires a project to be specified
// * users with global views need to be explicit about what projects the query will run against
const projectConstraints = {project: selection.projects};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the endpoint convert an empty project list into 'all projects'?

Copy link
Member Author

@billyvg billyvg Jul 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


this.props.api.bulkUpdate(
{
Expand Down
1 change: 1 addition & 0 deletions tests/js/spec/views/issueList/actions.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ describe('IssueListActions', function() {
expect.objectContaining({
query: {
id: [3, 6, 9],
project: [1],
},
data: {status: 'resolved'},
})
Expand Down