Skip to content

feat(issues): Add front end for resolve in upcoming release #72619

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 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
42 changes: 39 additions & 3 deletions static/app/components/actions/resolve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,23 @@ function ResolveActions({
});
}

function handleUpcomingReleaseResolution() {
if (hasRelease) {
onUpdate({
status: GroupStatus.RESOLVED,
statusDetails: {
inUpcomingRelease: true,
},
substatus: null,
});
}

trackAnalytics('resolve_issue', {
organization,
release: 'upcoming',
});
}

function handleNextReleaseResolution() {
if (hasRelease) {
onUpdate({
Expand Down Expand Up @@ -188,12 +205,25 @@ function ResolveActions({
});
};

const hasUpcomingRelease = organization.features.includes(
'resolve-in-upcoming-release'
);

const isSemver = latestRelease ? isSemverRelease(latestRelease.version) : false;
const items: MenuItemProps[] = [
{
key: 'upcoming-release',
label: t('The upcoming release'),
details: actionTitle
? actionTitle
: t('The next release that is not yet released.'),
onAction: () => onActionOrConfirm(handleUpcomingReleaseResolution),
hidden: !hasUpcomingRelease,
},
{
key: 'next-release',
label: t('The next release'),
details: actionTitle,
details: actionTitle ? actionTitle : t('The next release after the current one'),
onAction: () => onActionOrConfirm(handleNextReleaseResolution),
},
{
Expand Down Expand Up @@ -238,9 +268,15 @@ function ResolveActions({
)}
disabledKeys={
multipleProjectsSelected
? ['next-release', 'current-release', 'another-release', 'a-commit']
? [
'next-release',
'current-release',
'another-release',
'a-commit',
'upcoming-release',
]
: disabled || !hasRelease
? ['next-release', 'current-release', 'another-release']
? ['next-release', 'current-release', 'another-release', 'upcoming-release']
: []
}
menuTitle={shouldDisplayCta ? <SetupReleasesPrompt /> : t('Resolved In')}
Expand Down
9 changes: 9 additions & 0 deletions static/app/components/resolutionBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ function renderReason(
})
: t('This issue has been marked as resolved in the upcoming release.');
}

if (statusDetails.inUpcomingRelease) {
return actor
? tct('[actor] marked this issue as resolved in the upcoming release.', {
actor,
})
: t('This issue has been marked as resolved in the upcoming release.');
}

if (statusDetails.inRelease) {
const version = (
<Version
Expand Down
1 change: 1 addition & 0 deletions static/app/types/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ export interface ResolvedStatusDetails {
};
inNextRelease?: boolean;
inRelease?: string;
inUpcomingRelease?: boolean;
repository?: string;
}
interface ReprocessingStatusDetails {
Expand Down
Loading