getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.22k stars 4.21k forks source link

Merging issues is not working with the "All Projects" filter #81115

Open InterstellarStella opened 10 hours ago

InterstellarStella commented 10 hours ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. On the Issues tab, select "All Projects"
  2. Select 2 or more issues from the same project and merge them
  3. Refresh the page

Expected Result

The issues are successfully merged.

Actual Result

Initially, all selected issues disappear. Upon reloading the page, they all appear again separated, so the merging did not happen.

Video reproduction here: https://github.com/user-attachments/assets/5ea150fd-c8d9-4c93-8416-c1783693c125

The issue can be resolved by selecting a specific project in the project filter.

Product Area

Issues

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 10 hours ago

Auto-routing to @getsentry/product-owners-issues for triage ⏲️

lobsterkatie commented 8 hours ago

Yup, this is definitely a bug - a few of them actually. 1) The merging should work. 2) If the merging doesn't work, we shouldn't respond with a 200. In this case, if we think it's an illegal request, we should send a 400. 3) The UI shouldn't make the issues disappear, especially if nothing has actually happened to them.

For whoever picks this up:

When you try to do it, the request is PUT https://us.sentry.io/api/0/organizations/sentry/issues/?id=6076137886&id=6075862012&statsPeriod=7d, with a payload of {merge: 1}, and the response is a 200, with a payload of {detail: "Merging across multiple projects is not supported"}.

If you do it with a single project selected in the issue stream, though, the request is PUT https://us.sentry.io/api/0/organizations/sentry/issues/?id=6076137886&id=6075862012&project=6178942&statsPeriod=7d. (In other words, the project id is included in the query string.) The response is again a 200, but this time the payload is {merge: {parent: "6076137886", children: ["6075862012"]}}.

Interestingly, the FE already has some knowledge of the projects to which the selected issue belong, because if you select issues from different projects, it's doesn't even let you try to merge them:

Image

To-dos:

Putting this into the backlog.