Skip to content
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

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

Open
InterstellarStella opened this issue Nov 21, 2024 · 2 comments
Open

Comments

@InterstellarStella
Copy link

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
Copy link
Contributor

getsantry bot commented Nov 21, 2024

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

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 21, 2024
@lobsterkatie
Copy link
Member

lobsterkatie commented Nov 21, 2024

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:

  • In multi-project view, take whatever knowledge the FE has about project ids of the selected issues (it clearly knows project ids, or it wouldn't be able to grey out merging as shown in the screenshot) and use it to append the project id to the query string if the issues all come from the same project.
  • Change the endpoint to return a 400 if indeed we do manage to request to merge issues across projects.
  • The fact that both issues disappear is probably just a downstream effect of the combo of getting a 200 back but not getting a parent issue id back, but might also be worth looking into?

Putting this into the backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants