We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Issues resolved via UI do not appear in releases overview
To reproduce:

* Navigate to an issue
* Click "Resolve in current release (abc123)"
* Navigate to that release (abc123)
* Issue does not appear under "New Issues in this Release"


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/sentry/api/endpoints/issues_resolved_in_release.py`
Content:
```
1 from __future__ import absolute_import
2 
3 from rest_framework.response import Response
4 
5 from sentry.api.base import DocSection
6 from sentry.api.bases.project import ProjectEndpoint, ProjectPermission
7 from sentry.api.exceptions import ResourceDoesNotExist
8 from sentry.api.serializers import serialize
9 from sentry.api.serializers.models.group import StreamGroupSerializer
10 from sentry.models import (
11     Group,
12     GroupCommitResolution,
13     Release,
14     ReleaseCommit,
15 )
16 
17 
18 class IssuesResolvedInReleaseEndpoint(ProjectEndpoint):
19     doc_section = DocSection.RELEASES
20     permission_classes = (ProjectPermission, )
21 
22     def get(self, request, project, version):
23         """
24         List issues to be resolved in a particular release
25         ````````````````````````
26 
27         Retrieve a list of issues to be resolved in a given release.
28 
29         :pparam string organization_slug: the slug of the organization the
30                                           release belongs to.
31         :pparam string project_slug: the slug of the project associated with the release.
32         :pparam string version: the version identifier of the release.
33         :auth: required
34         """
35         try:
36             release = Release.objects.get(version=version, organization=project.organization)
37         except Release.DoesNotExist:
38             raise ResourceDoesNotExist
39 
40         groups = Group.objects.filter(
41             project=project,
42             id__in=GroupCommitResolution.objects.filter(
43                 commit_id__in=ReleaseCommit.objects.filter(
44                     release=release,
45                 ).values_list('commit_id', flat=True),
46             ).values_list('group_id', flat=True),
47         )
48 
49         context = serialize(list(groups), request.user, StreamGroupSerializer(stats_period=None))
50         return Response(context)
51
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/sentry/api/endpoints/issues_resolved_in_release.py b/src/sentry/api/endpoints/issues_resolved_in_release.py
--- a/src/sentry/api/endpoints/issues_resolved_in_release.py
+++ b/src/sentry/api/endpoints/issues_resolved_in_release.py
@@ -10,6 +10,7 @@
 from sentry.models import (
     Group,
     GroupCommitResolution,
+    GroupResolution,
     Release,
     ReleaseCommit,
 )
@@ -37,14 +38,27 @@
         except Release.DoesNotExist:
             raise ResourceDoesNotExist
 
-        groups = Group.objects.filter(
-            project=project,
-            id__in=GroupCommitResolution.objects.filter(
+        group_ids = set()
+        group_ids |= set(
+            GroupResolution.objects.filter(
+                release=release,
+            ).values_list('group_id', flat=True)
+        )
+        group_ids |= set(
+            GroupCommitResolution.objects.filter(
                 commit_id__in=ReleaseCommit.objects.filter(
                     release=release,
-                ).values_list('commit_id', flat=True),
-            ).values_list('group_id', flat=True),
+                ).values_list(
+                    'commit_id',
+                    flat=True,
+                )
+            ).values_list(
+                'group_id',
+                flat=True,
+            )
         )
 
+        groups = Group.objects.filter(project=project, id__in=group_ids)
+
         context = serialize(list(groups), request.user, StreamGroupSerializer(stats_period=None))
         return Response(context)

{"golden_diff": "diff --git a/src/sentry/api/endpoints/issues_resolved_in_release.py b/src/sentry/api/endpoints/issues_resolved_in_release.py\n--- a/src/sentry/api/endpoints/issues_resolved_in_release.py\n+++ b/src/sentry/api/endpoints/issues_resolved_in_release.py\n@@ -10,6 +10,7 @@\n from sentry.models import (\n     Group,\n     GroupCommitResolution,\n+    GroupResolution,\n     Release,\n     ReleaseCommit,\n )\n@@ -37,14 +38,27 @@\n         except Release.DoesNotExist:\n             raise ResourceDoesNotExist\n \n-        groups = Group.objects.filter(\n-            project=project,\n-            id__in=GroupCommitResolution.objects.filter(\n+        group_ids = set()\n+        group_ids |= set(\n+            GroupResolution.objects.filter(\n+                release=release,\n+            ).values_list('group_id', flat=True)\n+        )\n+        group_ids |= set(\n+            GroupCommitResolution.objects.filter(\n                 commit_id__in=ReleaseCommit.objects.filter(\n                     release=release,\n-                ).values_list('commit_id', flat=True),\n-            ).values_list('group_id', flat=True),\n+                ).values_list(\n+                    'commit_id',\n+                    flat=True,\n+                )\n+            ).values_list(\n+                'group_id',\n+                flat=True,\n+            )\n         )\n \n+        groups = Group.objects.filter(project=project, id__in=group_ids)\n+\n         context = serialize(list(groups), request.user, StreamGroupSerializer(stats_period=None))\n         return Response(context)\n", "issue": "Issues resolved via UI do not appear in releases overview\nTo reproduce:\r\n\r\n* Navigate to an issue\r\n* Click \"Resolve in current release (abc123)\"\r\n* Navigate to that release (abc123)\r\n* Issue does not appear under \"New Issues in this Release\"\r\n\n", "before_files": [{"content": "from __future__ import absolute_import\n\nfrom rest_framework.response import Response\n\nfrom sentry.api.base import DocSection\nfrom sentry.api.bases.project import ProjectEndpoint, ProjectPermission\nfrom sentry.api.exceptions import ResourceDoesNotExist\nfrom sentry.api.serializers import serialize\nfrom sentry.api.serializers.models.group import StreamGroupSerializer\nfrom sentry.models import (\n    Group,\n    GroupCommitResolution,\n    Release,\n    ReleaseCommit,\n)\n\n\nclass IssuesResolvedInReleaseEndpoint(ProjectEndpoint):\n    doc_section = DocSection.RELEASES\n    permission_classes = (ProjectPermission, )\n\n    def get(self, request, project, version):\n        \"\"\"\n        List issues to be resolved in a particular release\n        ````````````````````````\n\n        Retrieve a list of issues to be resolved in a given release.\n\n        :pparam string organization_slug: the slug of the organization the\n                                          release belongs to.\n        :pparam string project_slug: the slug of the project associated with the release.\n        :pparam string version: the version identifier of the release.\n        :auth: required\n        \"\"\"\n        try:\n            release = Release.objects.get(version=version, organization=project.organization)\n        except Release.DoesNotExist:\n            raise ResourceDoesNotExist\n\n        groups = Group.objects.filter(\n            project=project,\n            id__in=GroupCommitResolution.objects.filter(\n                commit_id__in=ReleaseCommit.objects.filter(\n                    release=release,\n                ).values_list('commit_id', flat=True),\n            ).values_list('group_id', flat=True),\n        )\n\n        context = serialize(list(groups), request.user, StreamGroupSerializer(stats_period=None))\n        return Response(context)\n", "path": "src/sentry/api/endpoints/issues_resolved_in_release.py"}], "after_files": [{"content": "from __future__ import absolute_import\n\nfrom rest_framework.response import Response\n\nfrom sentry.api.base import DocSection\nfrom sentry.api.bases.project import ProjectEndpoint, ProjectPermission\nfrom sentry.api.exceptions import ResourceDoesNotExist\nfrom sentry.api.serializers import serialize\nfrom sentry.api.serializers.models.group import StreamGroupSerializer\nfrom sentry.models import (\n    Group,\n    GroupCommitResolution,\n    GroupResolution,\n    Release,\n    ReleaseCommit,\n)\n\n\nclass IssuesResolvedInReleaseEndpoint(ProjectEndpoint):\n    doc_section = DocSection.RELEASES\n    permission_classes = (ProjectPermission, )\n\n    def get(self, request, project, version):\n        \"\"\"\n        List issues to be resolved in a particular release\n        ````````````````````````\n\n        Retrieve a list of issues to be resolved in a given release.\n\n        :pparam string organization_slug: the slug of the organization the\n                                          release belongs to.\n        :pparam string project_slug: the slug of the project associated with the release.\n        :pparam string version: the version identifier of the release.\n        :auth: required\n        \"\"\"\n        try:\n            release = Release.objects.get(version=version, organization=project.organization)\n        except Release.DoesNotExist:\n            raise ResourceDoesNotExist\n\n        group_ids = set()\n        group_ids |= set(\n            GroupResolution.objects.filter(\n                release=release,\n            ).values_list('group_id', flat=True)\n        )\n        group_ids |= set(\n            GroupCommitResolution.objects.filter(\n                commit_id__in=ReleaseCommit.objects.filter(\n                    release=release,\n                ).values_list(\n                    'commit_id',\n                    flat=True,\n                )\n            ).values_list(\n                'group_id',\n                flat=True,\n            )\n        )\n\n        groups = Group.objects.filter(project=project, id__in=group_ids)\n\n        context = serialize(list(groups), request.user, StreamGroupSerializer(stats_period=None))\n        return Response(context)\n", "path": "src/sentry/api/endpoints/issues_resolved_in_release.py"}]}