getsentry / sentry

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

feat(issues/feedback): allow hasAttachments to be expanded for feedback usecase #70102

Closed michellewzhang closed 2 weeks ago

michellewzhang commented 2 weeks ago

relates to https://github.com/getsentry/sentry/issues/67795

allow expansion of a new flag on an issue, hasAttachments, which will specify whether a group has any event attachments. we'll use this in user feedback to show a indicator when a feedback has an attachment (e.g. screenshot).

context: the user feedback list shows small icon indicators when certain properties are true (e.g. hasReplay, hasLinkedError) and we want to add another one to this list: hasAttachments (aka hasScreenshots). however, the list relies on having issue data only. we don't have access to the attachments list just from the issue (we'd have to do a separate api call on the frontend to get the list of attachments which is unideal), so instead i'm adding an option to expand and directly put the hasAttachments property onto the issue when requested.

frontend changes using this PR are here: https://github.com/getsentry/sentry/pull/70109

aliu3ntry commented 2 weeks ago

lgtm

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 79.83%. Comparing base (da61e5a) to head (840b7c7). Report is 39 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #70102 +/- ## ======================================== Coverage 79.82% 79.83% ======================================== Files 6504 6505 +1 Lines 289378 289538 +160 Branches 49834 49862 +28 ======================================== + Hits 230992 231146 +154 - Misses 57975 57981 +6 Partials 411 411 ``` | [Files](https://app.codecov.io/gh/getsentry/sentry/pull/70102?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [src/sentry/api/serializers/models/group\_stream.py](https://app.codecov.io/gh/getsentry/sentry/pull/70102?src=pr&el=tree&filepath=src%2Fsentry%2Fapi%2Fserializers%2Fmodels%2Fgroup_stream.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c3JjL3NlbnRyeS9hcGkvc2VyaWFsaXplcnMvbW9kZWxzL2dyb3VwX3N0cmVhbS5weQ==) | `84.84% <88.88%> (+0.12%)` | :arrow_up: | | [src/sentry/api/endpoints/group\_details.py](https://app.codecov.io/gh/getsentry/sentry/pull/70102?src=pr&el=tree&filepath=src%2Fsentry%2Fapi%2Fendpoints%2Fgroup_details.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c3JjL3NlbnRyeS9hcGkvZW5kcG9pbnRzL2dyb3VwX2RldGFpbHMucHk=) | `89.30% <33.33%> (-2.20%)` | :arrow_down: | ... and [33 files with indirect coverage changes](https://app.codecov.io/gh/getsentry/sentry/pull/70102/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry)